【问题标题】:Running subprocess npm get me a error when creating ionic project创建 ionic 项目时运行 subprocess npm 时出现错误
【发布时间】:2019-03-01 15:19:53
【问题描述】:

当我尝试在 ionic 2 上开发一个新项目时,我遇到了这个错误。

我得到一个 mkdir 错误,即使在 sudo 上运行命令,我也使用 mac os。

我尝试重新安装节点,cordovan npm,尝试进行一些更新,并用谷歌搜索了问题,但找不到解决方案。

请帮帮我,我是离子初学者。

错误:

gyp ERR! configure error 
gyp ERR! stack Error: EACCES: permission denied, mkdir '/Users/Loic/appIonic/swipeCard/test/node_modules/node-sass/build'
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/bin/node" "/Users/Loic/appIonic/swipeCard/test/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/Loic/appIonic/swipeCard/test/node_modules/node-sass
gyp ERR! node -v v10.10.0
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.9.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the node-sass@4.9.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/Loic/.npm/_logs/2018-09-22T16_45_54_600Z-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.

谢谢

【问题讨论】:

  • 有没有想过这个问题?

标签: ionic-framework ionic2


【解决方案1】:

尝试清除 C:\Users\\AppData\Roaming\npm-cache\ 的 npm 缓存

【讨论】:

    【解决方案2】:

    我已经有六个月没有使用 ionic 了。当我回来时,他们要求我将 ionic 更新到最新版本。更新后我什至不能开始一个新项目。所以在浪费了一段时间后,我只是使用命令降级到 ionic 3.20.0

    npm install -g cordova ionic@3.20.0
    

    现在一切正常

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-11-26
      • 2021-08-10
      • 2021-04-10
      • 2020-02-20
      • 2021-10-30
      相关资源
      最近更新 更多