reactjs - 在来自 github 的 react 项目上运行 npm install 时出现 npm err code 1
问题描述
我现在正在学习网络开发一段时间。我正在使用 React.js 库。每当我尝试从 Github 克隆一个 react 项目并运行 npm install 时,我都会收到以下错误:你能帮我解决这个问题吗?
npm ERR! code 1
npm ERR! path C:\Users\user\OneDrive\old Desktop\web developer\developer-portfolio\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/build.js
npm ERR! Building: C:\Program Files\nodejs\node.exe C:\Users\user\OneDrive\old Desktop\web developer\developer-portfolio\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp ERR! node -v v14.16.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user\AppData\Local\npm-cache\_logs\2021-06-22T14_17_09_580Z-debug.log
解决方案
推荐阅读
- asp.net-core - 配置后如何获取 appSetting(ASP.NET Web API DI)
- php - 使用 get_coupons() 未检索到的代码中添加的 WooCommerce 优惠券
- sql - SQL 查找代码
- json - 使用 Athena 搜索混合数据 S3 存储桶
- python - 引发 ValueError('token' 或 'bot' 必须通过?
- c++ - 重载 operator<< 模板类
- javascript - 无法读取嵌套数组中的项目?
- android - 我可以确认应用用户确实与 Intent.ACTION_SEND 共享了我的应用链接吗?
- php - 如何让我的加载屏幕 div 占据我的整个屏幕,甚至是它下面的所有内容
- javascript - 生成单独的 CSS 文件与将 CSS 直接注入