Ionic 框架:创建项目时 Ionic 构建失败 (v4.12.0)

2024-05-04

I have ionic安装在我的系统中。当我跑步时ionic run app tabs它安装了所有npm包,但随后提示符变为

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.11.0/linux-x64-72_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.11.0/linux-x64-72_binding.node":

HTTP error 404 Not Found

然后失败并提示

gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/l3g0b0y/code/greenlink/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:196:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:256:12)
gyp ERR! System Linux 4.15.0-47-generic
gyp ERR! command "/home/l3g0b0y/.nvm/versions/node/v12.0.0/bin/node" "/home/l3g0b0y/code/greenlink/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /home/l3g0b0y/code/greenlink/node_modules/node-sass
gyp ERR! node -v v12.0.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
Build failed with error code: 1
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] /cdn-cgi/l/email-protection (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected] /cdn-cgi/l/email-protection: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] /cdn-cgi/l/email-protection (node_modules/node-sass):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] /cdn-cgi/l/email-protection postinstall: `node scripts/build.js`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

我已经尝试过删除node_modules并重新安装软件包。我尝试重新安装ionic-cli以及。这是行不通的。

我在用着node v12.0.0 npm v6.9.0 ionic v4.12.0


确实,版本https://github.com/sass/node-sass/releases/download/v4.11.0/linux-x64-72_binding.node不可用,因为您正在使用节点v12并尝试获取不受支持的版本node-sass对于节点 v12。

解决方案是将您的节点版本降级到v11或者将您的 node-sass 依赖项升级到最新版本。

如果您(对于与/另一个图书馆有相同问题的访问者。在这里,它是ionic) 正在使用node-sass作为供应商库,降级到节点 v11 并通知库开发团队需要更新。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Ionic 框架:创建项目时 Ionic 构建失败 (v4.12.0) 的相关文章

随机推荐