Yarn - Node Sass does not yet support my current environment

后端 未结 6 1294
春和景丽
春和景丽 2021-01-07 16:48

I\'m using Sage WordPress starter theme - https://github.com/roots/sage.

From today when I run yarn build (webpack --progress --config /webpack.config.js) appears th

相关标签:
6条回答
  • 2021-01-07 17:24

    For me, this solution works. here are the steps:

    1. go to node-sass folder (it can be "../node_modules/node-sass/src" or somewhere else, for example for Angular it is located in "../node_modules/@angular-devkit/build-angular/node_modules/node-sass/src") you can find the location in logs:
    2. open create_string.cpp
    3. change v8::String::Utf8Value string(value); to v8::String::Utf8Value string(v8::Isolate::GetCurrent(), value);

    if you couldn't find "node-sass" folder rerun "npm install" and when you see node-sass logs in the console, terminate the process with ctrl+c.

    0 讨论(0)
  • 2021-01-07 17:28

    I'm using OSX latest version(10.14.4 (18E226)) and node 12.

    While using node-sass 4.11, I had g++ error(../src/create_string.cpp:17:25: error: no matching constructor for initialization of 'v8::String::Utf8Value') while trying npm install, npm rebuild(link) which did not work.

    I solved this by updating node-sass to 4.12(npm install node-sass), as the github issue on the node-sass says that support for node 12 is implemented in 4.12 version.

    0 讨论(0)
  • 2021-01-07 17:34

    this is what worked for me. Downgrade your node version to 10.16.0 node 12 still has some issues

    0 讨论(0)
  • 2021-01-07 17:37

    node 12 have this problem when run npm install node-sass,downgrading node to 10.16 works

    0 讨论(0)
  • 2021-01-07 17:39

    Upgrade node-sass to 4.12.0 and it will fix the issue.

    0 讨论(0)
  • 2021-01-07 17:45

    If anyone is using Amazon EC2 AMI Image then follow below instructions

    1. Install nvm only from https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-up-node-on-ec2-instance.html
    2. nvm ls-remote
    3. nvm install v10.16.0

    node-sass build will be successful as per your AMI Image.

    0 讨论(0)
提交回复
热议问题