Ionic Framework:创建项目(v4.12.0)时,Ionic构建失败 [英] Ionic Framework : Ionic build fails while creating the project (v4.12.0)

查看:76
本文介绍了Ionic Framework:创建项目(v4.12.0)时,Ionic构建失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的系统中安装了 ionic 。当我运行 ionic run应用程序选项卡时,它会安装所有 npm 软件包,但提示将变为

I have ionic installed in my system. When i run ionic run app tabs it installs all the npm packages but then the prompt falls to

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: 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

我已经尝试删除 node_modules 并重新安装包。我也尝试重新安装 ionic-cli

I have already tried removing node_modules and reinstall the packages. I tried reinstalling ionic-cli as well. Which doesn't work.

我正在使用
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

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.

解决方案是将节点版本降级为 v11 或升级节点-sass依赖于最新版本。

The solution is to downgrade your node version to v11 or upgrade your node-sass dependency to the latest.

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

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 Framework:创建项目(v4.12.0)时,Ionic构建失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆