最新消息:VPS服务器又从fzhost.net换回Linode了,主题仍用朋友推荐的大前端D8

【已解决】vue运行出错:Module build failed Error Node Sass does not yet support your current environment OS X 64-bit with Unsupported runtime 59

Vue crifan 1628浏览 0评论

折腾:

【已解决】Vue调试出错:GET localhost __webpack_hmr net ERR_INCOMPLETE_CHUNKED_ENCODING

期间,把node从8.0.0升级到最新版本9.0.0后,结果npm run dev出错了:

error  in ./src/App.vue
Module build failed: Error: Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (59)
For more information on which environments are supported please see:
    at module.exports (/Users/crifan/dev/dev_root/daryun/Projects/上汽大众/斯柯达/总部报表/sourcecode/web_admin/HeadquarterReport/node_modules/node-sass/lib/binding.js:13:13)

node 9 Module build failed Error Node Sass does not yet support your current environment OS X 64-bit with Unsupported runtime 59

Node Sass does not yet support your current environment (macOS 10.12.1, Node 7.0.0) · Issue #1764 · sass/node-sass

在尝试:

npm rebuild node-sass

之前,看到之前已有node-sass:

"node-sass": "^4.5.0”,

怀疑版本太低?

所以卸载后重装

➜  HeadquarterReport git:(permission-control) ✗ npm uninstall node-sass -D
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN sass-loader@6.0.5 requires a peer of node-sass@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN vue-admin-template@1.0.0 No repository field.
removed 96 packages in 8.065s
➜  HeadquarterReport git:(permission-control) ✗ npm install node-sass -D
> node-sass@4.6.0 install /Users/crifan/dev/dev_root/daryun/Projects/上汽大众/斯柯达/总部报表/sourcecode/web_admin/HeadquarterReport/node_modules/node-sass
> node scripts/install.js
Download complete  ⸩ ⠋ :
Binary saved to /Users/crifan/dev/dev_root/daryun/Projects/上汽大众/斯柯达/总部报表/sourcecode/web_admin/HeadquarterReport/node_modules/node-sass/vendor/darwin-x64-59/binding.node
Caching binary to /Users/crifan/.npm/node-sass/4.6.0/darwin-x64-59_binding.node
> node-sass@4.6.0 postinstall /Users/crifan/dev/dev_root/daryun/Projects/上汽大众/斯柯达/总部报表/sourcecode/web_admin/HeadquarterReport/node_modules/node-sass
> node scripts/build.js
Binary found at /Users/crifan/dev/dev_root/daryun/Projects/上汽大众/斯柯达/总部报表/sourcecode/web_admin/HeadquarterReport/node_modules/node-sass/vendor/darwin-x64-59/binding.node
Testing binary
Binary is fine
npm WARN vue-admin-template@1.0.0 No repository field.
+ node-sass@4.6.0
added 96 packages in 406.661s

然后结果就解决了此问题了。

【总结】

此处是Vue环境下,把node从8.0.0升级到9.0.0导致了,之前已安装的4.5.2的Node Sass报错了。

解决办法是:

卸载重装(最新版本的node-sass)即可:

npm uninstall node-sass -D

npm install node-sass -D

此处安装的node-sass最新版是4.6.0

转载请注明:在路上 » 【已解决】vue运行出错:Module build failed Error Node Sass does not yet support your current environment OS X 64-bit with Unsupported runtime 59

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
14 queries in 0.228 seconds, using 10.23MB memory