I am trying to install my packages with yarn install
I have node 12.1.0
installed, and as I understand, node-sass
needs to be at least version 4.12+
to work with node 12
my package.json file is as so:
{
"name": "redacted",
"private": true,
"dependencies": {
"@rails/webpacker": "3.5",
"babel-preset-react": "^6.24.1",
"bootstrap": "^4.1.2",
"font-awesome": "^4.7.0",
"js-md5": "^0.7.3",
"moment": "^2.22.2",
"prop-types": "^15.6.2",
"qrcode.react": "^0.8.0",
"react": "^16.4.1",
"react-big-calendar": "^0.19.2",
"react-dom": "^16.4.1",
"react-loading": "^2.0.3",
"react-router": "^4.3.1",
"react-router-dom": "^4.3.1",
"react-transition-group": "^2.5.0",
"urijs": "^1.19.1"
},
"devDependencies": {
"webpack-dev-server": "2.11.2"
}
}
The (truncated) error I get is:
../fsevents.cc:85:58: error: expected ';' after top level declarator
void FSEvents::Initialize(v8::Handle<v8::Object> exports) {
^
;
30 warnings and 14 errors generated.
make: *** [Release/obj.target/fse/fsevents.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/snowflakekiller/Documents/Projects/Code/sjc_platform/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 Darwin 18.2.0
gyp ERR! command \"/usr/local/Cellar/node/12.1.0/bin/node\" \"/Users/snowflakekiller/Documents/Projects/Code/sjc_platform/node_modules/node-gyp/bin/node-gyp.js\" \"build\" \"--fallback-to-build\" \"--module=/Users/snowflakekiller/Documents/Projects/Code/sjc_platform/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node\" \"--module_name=fse\" \"--module_path=/Users/snowflakekiller/Documents/Projects/Code/sjc_platform/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64\" \"--napi_version=4\" \"--node_abi_napi=napi\"
gyp ERR! cwd /Users/snowflakekiller/Documents/Projects/Code/sjc_platform/node_modules/fsevents
gyp ERR! node -v v12.1.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/12.1.0/bin/node /Users/snowflakekiller/Documents/Projects/Code/sjc_platform/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/snowflakekiller/Documents/Projects/Code/sjc_platform/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node --module_name=fse --module_path=/Users/snowflakekiller/Documents/Projects/Code/sjc_platform/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64 --napi_version=4 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/snowflakekiller/Documents/Projects/Code/sjc_platform/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:196:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1000:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:267:5)
node-pre-gyp ERR! System Darwin 18.2.0
node-pre-gyp ERR! command \"/usr/local/Cellar/node/12.1.0/bin/node\" \"/Users/snowflakekiller/Documents/Projects/Code/sjc_platform/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp\" \"install\" \"--fallback-to-build\"
node-pre-gyp ERR! cwd /Users/snowflakekiller/Documents/Projects/Code/sjc_platform/node_modules/fsevents
node-pre-gyp ERR! node -v v12.1.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.0
node-pre-gyp ERR! not ok
I have tried installing just node-sass
alone with yarn add node-sass
but it still fails with the same sort of error.
How can I get get past this?
I managed to solve this by deleting my lockfile and running yarn install
again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With