记录一次npm安装expo的失败案例
当按照expo安装文档创建expo项目时
npx create-expo-app my-app && cd my-app
但不出意外的出现了意外,显示一下错误:
× Something went wrong in downloading and extracting the project files: npm.cmd exited with non-zero code: 1 Error: npm.cmd exited with non-zero code: 1
查阅了各种文档,也尝试了其他方法,包括使用yarn和pnpm
pnpm create expo-app
或
yarn create expo-app
也开启了FQ依然无济于事,最后升级npm解决了
npm install -g npm@latest
npm version由10.2.3 -> 10.5.1
added 1554 packages in 34s 98 packages are looking for funding run `npm fund` for details ✅ Your project is ready! To run your project, navigate to the directory and run one of the following npm commands. - cd first-app - npm run android - npm run ios # you need to use macOS to build the iOS project - use the Expo app if you need to do iOS development without a Mac - npm run web
完美解决了问题

浙公网安备 33010602011771号