LoginSignup
6
2

More than 3 years have passed since last update.

yarn install時に"Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime"というエラーが出る

Last updated at Posted at 2019-10-28

エラー内容


Error: Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (72)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v4.11.0
    at module.exports (/Users/hayashi-ay/Project/monaca-app-codmon2-vuejs/node_modules/node-sass/lib/binding.js:13:13)
    at Object.<anonymous> (/Users/hayashi-ay/Project/monaca-app-codmon2-vuejs/node_modules/node-sass/lib/index.js:14:35)
    at Generator.next (<anonymous>)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:947:10)

エラー詳細

エラーにあるリンクを見に行きます。
https://github.com/sass/node-sass/releases/tag/v4.11.0

サポート環境(Supported Environments)を見ると以下みたいでした。

OS Architecture Node
Windows x86 & x64 0.10, 0.12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
OSX x64 0.10, 0.12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
Linux* x86 & x64 0.10, 0.12, 1, 2, 3, 4, 5, 6, 7, 8*, 9, 10^, 11*
Alpine Linux x64 6, 8, 10, 11

自端末に入っているNodeのバージョンが12でpackage.jsonにかかれているnode-sassのバージョンでは未対応のためエラーになってたことが分かりました。

$ node --version
v12.10.0

解決方法

  1. package.jsonにあるnode-sassのバージョンを新しくする
    1番まっとうな解決策かなと思います。
    node-sassの4.12.0バージョンではNodeのバージョン12に対応しているのでpackage.jsonにあるnode-sassのバージョンを新しくすると良いです。
    https://github.com/sass/node-sass/releases/tag/v4.12.0
  2. Nodeのバージョンを11以下にする
    なにか特別な事情がある場合のみ。
6
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
2