[英]Ionic Framework : Ionic build fails while creating the project (v4.12.0)
I have ionic
installed in my system.我的系统中安装了
ionic
。 When i run ionic run app tabs
it installs all the npm
packages but then the prompt falls to当我运行
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
Then it fails with the prompt showing然后它失败并显示提示
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: fsevents@1.2.8 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.8: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: node-sass@4.11.0 (node_modules/node-sass):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: node-sass@4.11.0 postinstall: `node scripts/build.js`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
I have already tried removing node_modules
and reinstall the packages.我已经尝试删除
node_modules
并重新安装软件包。 I tried reinstalling ionic-cli
as well.我也尝试重新安装
ionic-cli
。 Which doesn't work.哪个不起作用。
I'm using node v12.0.0
npm v6.9.0
ionic v4.12.0
我正在使用
node v12.0.0
npm v6.9.0
ionic v4.12.0
Indeed, the version https://github.com/sass/node-sass/releases/download/v4.11.0/linux-x64-72_binding.node
is not available because you are using node v12
and try to get unsupported version of node-sass
for node v12.实际上,版本
https://github.com/sass/node-sass/releases/download/v4.11.0/linux-x64-72_binding.node
不可用,因为您使用的是 node v12
并尝试获取不受支持的node-sass
版本node-sass
用于节点 v12。
The solution is to downgrade your node version to v11
or upgrade your node-sass dependency to the latest.解决方案是将您的节点版本降级到
v11
或将您的 node-sass 依赖项升级到最新版本。
If you (for visitors having the same issue w/ another library. Here, it is ionic
) are using node-sass
as a vendor library, downgrade to node v11 and notify the library developer team to the need for an update.如果您(对于与另一个库有相同问题的访问者。这里是
ionic
)正在使用node-sass
作为供应商库,请降级到 node v11 并通知库开发团队需要更新。
另一种选择是将节点 11 添加到您的开发依赖项中:
npm i --save-dev node@11
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.