【问题标题】:How to resolve "Build failed with error code: 1" when running ionic?运行离子时如何解决“构建失败,错误代码:1”?
【发布时间】:2021-08-04 20:40:29
【问题描述】:

创建 ionic 项目时出现以下错误:

gyp ERR! configure error 
gyp ERR! stack Error: EACCES: permission denied, mkdir '/Users/fernandolucio/tesfff/node_modules/node-sass/build'
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/bin/node" "/Users/fernandolucio/tesfff/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/fernandolucio/tesfff/node_modules/node-sass
gyp ERR! node -v v10.14.2
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
Build failed with error code: 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.11.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the node-sass@4.11.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/fernandolucio/.npm/_logs/2018-12-23T00_18_35_148Z-debug.log
[ERROR] An error occurred while running subprocess npm.

    npm i exited with exit code 1.

    Re-running this command with the --verbose flag may provide more 
    information.

如何解决这些错误?我正在使用:

  • 离子版本 4.6.0
  • 节点版本 10.14.2
  • npm 版本 6.5.0

【问题讨论】:

  • 您不会在安装的同时运行应用程序吗?或者在终端中打开一个子文件夹?该错误表明另一个进程正在锁定文件/文件夹
  • 有可能是python 2
  • npm 错误!代码 E404 npm 错误! 404 未找到:phynton@lastest
  • 您需要在外部使用 sudo 命令安装 SAAS,以便在安装 SAAS 后使用。

标签: node.js ionic-framework npm


【解决方案1】:

使用以下命令解决了我的问题

~ npm install node-sass@latest

【讨论】:

    猜你喜欢
    • 2021-10-18
    • 2021-05-07
    • 1970-01-01
    • 2019-07-10
    • 2016-05-28
    • 2017-02-01
    • 1970-01-01
    • 2019-03-26
    • 1970-01-01
    相关资源
    最近更新 更多