侧边栏壁纸
博主头像
学海无涯博主等级

有疑问可发邮件[email protected]

  • 累计撰写 326 篇文章
  • 累计创建 85 个标签
  • 累计收到 0 条评论

目 录CONTENT

文章目录

npm install异常

利刃
2022-06-04 / 0 评论 / 0 点赞 / 20 阅读 / 3039 字
温馨提示:
本文最后更新于 2024-08-13,若内容或图片失效,请留言反馈。部分素材来自网络,若不小心影响到您的利益,请联系我们删除。

异常信息

gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\zp\.pyenv\pyenv-win\shims\python.BAT -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", line 1
gyp ERR! stack     import sys; print "s. sys.version_info[:3];
gyp ERR! stack                                               ^
gyp ERR! stack SyntaxError: EOL while scanning string literal
gyp ERR! stack
gyp ERR! stack     at ChildProcess.exithandler (node:child_process:398:12)
gyp ERR! stack     at ChildProcess.emit (node:events:527:28)
gyp ERR! stack     at maybeClose (node:internal/child_process:1092:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
gyp ERR! System Windows_NT 10.0.22000
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\DEV\\IT_OS\\it_os_vue\\node_modules\\[email protected]@node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd D:\DEV\IT_OS\it_os_vue\node_modules\[email protected]@node-sass
gyp ERR! node -v v16.15.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
[npminstall:runscript:error] [email protected] › node-sass@^4.5.3 scripts.postinstall run "node scripts/build.js" error: Error [RunScriptError]: Run "C:\Windows\system32\cmd.exe /d /s /c node scripts/build.js" error, exit code 1
    at ChildProcess.<anonymous> (C:\Users\zp\AppData\Roaming\npm\node_modules\cnpm\node_modules\runscript\index.js:96:21)
    at ChildProcess.emit (node:events:527:28)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12) {
  stdio: [Object],
  exitcode: 1
}
× Install fail! RunScriptError: post install error, please remove node_modules before retry!
Run "C:\Windows\system32\cmd.exe /d /s /c node scripts/build.js" error, exit code 1
RunScriptError: Run "C:\Windows\system32\cmd.exe /d /s /c node scripts/build.js" error, exit code 1
    at ChildProcess.<anonymous> (C:\Users\zp\AppData\Roaming\npm\node_modules\cnpm\node_modules\runscript\index.js:96:21)
    at ChildProcess.emit (node:events:527:28)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npminstall version: 6.2.0
npminstall args: C:\Program Files\nodejs\node.exe C:\Users\zp\AppData\Roaming\npm\node_modules\cnpm\node_modules\npminstall\bin\install.js --fix-bug-versions --china --userconfig=C:\Users\zp\.cnpmrc --disturl=https://npmmirror.com/mirrors/node --registry=https://registry.npmmirror.com


解决方式

下面命令执行两次就好

npm install -g cnpm --registry=https://registry.npm.taobao.org
cnpm install


2022-6-4 15:57:57

0
  1. 支付宝打赏

    qrcode alipay
  2. 微信打赏

    qrcode weixin

评论区