libstdc++ is deprecated; move to libc++ when installing Babel using npm on Catalina - reactjs

my error output looks like this:
> node-gyp rebuild
SOLINK_MODULE(target) Release/.node
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
ld: library not found for -lstdc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Release/.node] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:219:12)
gyp ERR! System Darwin 19.4.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/simonhurst/PycharmProjects/supervalet/node_modules/fsevents
gyp ERR! node -v v6.17.1
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
When running
npm i -D #babel/core babel-loader #babel/preset-env #babel/preset-react babel-plugin-transform-class-properties
Now I can see the issue is here :
library not found for -lstdc++
However have zero idea how to resolve it.
Been searching the web and stackoverflow - messing around with uninstalling Xcode reinstalling exode looking hombrew... etc but as of yet absolutely no joy.
I'm Python dev by trade so node is most certainly not my expertise. If someone could shed some light on how to resolve this issue that would be wonderful. I can't believe I'm the only one having it.
Thanks

Wow after reading many posts and many issues on GitHub... the solution in my case wasn't making sure I had Xcode installed, and the corresponding command line tools installed and making sure I'd accepted the Apple Licence agreement. It was simply a question of updating the version of node that I was using. In my case I was using version 6.x this was the version that came pre-installed on my brand new mac. Annoying. Visit https://nodejs.org/en/ to upgrade your node version. At the time of writing this the versions I upgraded to was 12.16.1 - in the event that's helpful to a future reader of this question 'n answer session :)
Really feel the error message could have been way more helpful here, but hey that's how things are some times.

Related

Gatsby Develop : Something went wrong installing the "sharp" module

I just did a git clone off a starter template on Gatsby-- bumped into this error when I ran 'gatsby develop'. I've deleted the node module, as well as the sharp module in node module. To no avail.
Do let me know what's going on at this point! :-)
PS C:\Users\ipche\gatsby-strapi-starter> gatsby develop
success open and validate gatsby-configs - 0.073s
ERROR
Something went wrong installing the "sharp" module
Cannot find module '../build/Release/sharp.node'
Require stack:
- C:\Users\ipche\gatsby-strapi-starter\node_modules\gatsby-transformer-sharp\node_modules\sharp\lib\constructor.js
- C:\Users\ipche\gatsby-strapi-starter\node_modules\gatsby-transformer-sharp\node_modules\sharp\lib\index.js
- C:\Users\ipche\gatsby-strapi-starter\node_modules\gatsby-transformer-sharp\safe-sharp.js
- C:\Users\ipche\gatsby-strapi-starter\node_modules\gatsby-transformer-sharp\extend-node-type.js
- C:\Users\ipche\gatsby-strapi-starter\node_modules\gatsby-transformer-sharp\gatsby-node.js
- C:\Users\ipche\gatsby-strapi-starter\node_modules\gatsby\dist\bootstrap\resolve-module-exports.js
- C:\Users\ipche\gatsby-strapi-starter\node_modules\gatsby\dist\bootstrap\load-plugins\validate.js
- C:\Users\ipche\gatsby-strapi-starter\node_modules\gatsby\dist\bootstrap\load-plugins\load.js
- C:\Users\ipche\gatsby-strapi-starter\node_modules\gatsby\dist\bootstrap\load-plugins\index.js
- C:\Users\ipche\gatsby-strapi-starter\node_modules\gatsby\dist\bootstrap\index.js
- C:\Users\ipche\gatsby-strapi-starter\node_modules\gatsby\dist\commands\develop-process.js
- C:\Users\ipche\gatsby-strapi-starter\.cache\tmp-19076-nq3SvOAJn7yo
- Remove the "node_modules/sharp" directory, run "npm install" and look for errors
- Consult the installation documentation at https://sharp.pixelplumbing.com/en/stable/install/
- Search for this error at https://github.com/lovell/sharp/issues
Ran 'npm build' here
C:\Users\ipche\gatsby-strapi-starter\node_modules\gatsby-transformer-sharp\node_modules\sharp\src\stats.cc(130,1): error C2661: 'v8::Object::Set': no overloa
ded function takes 2 arguments [C:\Users\ipche\gatsby-strapi-starter\node_modules\gatsby-transformer-sharp\node_modules\sharp\build\sharp.vcxproj]
C:\Users\ipche\gatsby-strapi-starter\node_modules\gatsby-transformer-sharp\node_modules\sharp\src\stats.cc(140,20): warning C4834: discarding return value of
function with 'nodiscard' attribute [C:\Users\ipche\gatsby-strapi-starter\node_modules\gatsby-transformer-sharp\node_modules\sharp\build\sharp.vcxproj]
C:\Users\ipche\gatsby-strapi-starter\node_modules\gatsby-transformer-sharp\node_modules\sharp\src\pipeline.cc(1017,20): warning C4834: discarding return valu
e of function with 'nodiscard' attribute [C:\Users\ipche\gatsby-strapi-starter\node_modules\gatsby-transformer-sharp\node_modules\sharp\build\sharp.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\ipche\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:314:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\ipche\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js"
"rebuild"
gyp ERR! cwd C:\Users\ipche\gatsby-strapi-starter\node_modules\gatsby-transformer-sharp\node_modules\sharp
gyp ERR! node -v v14.13.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sharp#0.22.1 install: `(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sharp#0.22.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ipche\AppData\Roaming\npm-cache\_logs\2020-10-06T21_03_57_721Z-debug.log
By the way, I went to package.json and changed the dependency version of sharp to 'sharp#0.22.1'. It was previously sharp#0.26.1!
Any leads?
EDIT
Ran ' npm install --verbose sharp'
1 Error(s)
Time Elapsed 00:00:11.67
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\ipche\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:314:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\ipche\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js"
"rebuild"
gyp ERR! cwd C:\Users\ipche\gatsby-strapi-starter\node_modules\sharp
gyp ERR! node -v v14.13.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm verb lifecycle sharp#0.22.1~install: unsafe-perm in lifecycle true
npm verb lifecycle sharp#0.22.1~install: PATH: C:\Users\ipche\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\ipche\gatsby-strapi-starter\node_modules\sharp\node_modules\.bin;C:\Users\ipche\gatsby-strapi-starter\node_modules\.bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Python38\Scripts\;C:\Python38\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Program Files\PuTTY\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Users\ipche\anaconda3;C:\Users\ipche\anaconda3\Library\mingw-w64\bin;C:\Users\ipche\anaconda3\Library\usr\bin;C:\Users\ipche\anaconda3\Library\bin;C:\Users\ipche\anaconda3\Scripts;C:\Users\ipche\AppData\Local\Microsoft\WindowsApps;C:\Users\ipche\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\ipche\AppData\Local\GitHubDesktop\bin;C:\Panda3D-1.10.6-x64\python;C:\Panda3D-1.10.6-x64\python\Scripts;C:\Panda3D-1.10.6-x64\bin;C:\Users\ipche\Documents\GitHub\feelDetection\Panda3D-1.10.6-x64\python;C:\Users\ipche\Documents\GitHub\feelDetection\Panda3D-1.10.6-x64\python\Scripts;C:\Users\ipche\Documents\GitHub\feelDetection\Panda3D-1.10.6-x64\bin;C:\Users\ipche\AppData\Roaming\npm
npm verb lifecycle sharp#0.22.1~install: CWD: C:\Users\ipche\gatsby-strapi-starter\node_modules\sharp
npm info lifecycle sharp#0.22.1~install: Failed to exec install script
npm timing action:install Completed in 15700ms
npm verb unlock done using C:\Users\ipche\AppData\Roaming\npm-cache\_locks\staging-4a5f00369a03df36.lock for C:\Users\ipche\gatsby-strapi-starter\node_modules\.staging
npm timing stage:rollbackFailedOptional Completed in 250ms
npm timing stage:runTopLevelLifecycles Completed in 39766ms
Delete the node_module folder first and then try out the below-given methods! This works for me
Update the version of the sharp package manually in the package.json file and then try to run the command npm i sharp
or first, install sharp package and then run the command npm install
In Windows, you may need extra dependencies to make the sharp module work. Try running:
npm install --global windows-build-tools --vs2015
Upon installing this package, it downloads and installs Visual C++ Build Tools 2015, provided free of charge by Microsoft. These tools are required to compile popular native modules. It will also install Python 2.7, configuring your machine, and npm appropriately.
Check Gatsby on Windows docs for further information.
On my Windows machine another possible solution is to update all the related gatsby plugins (for images).
I did it with yarn, of course, as suggested delete the node modules beforehand.
yarn upgrade-interactive --latest
Pick the onces you need, hope that solves the errors.
The problem could be anything but what worked for me was downgrading my nodejs version, specifically to 14.15.0 using nvm.
steps to follow :
Downgrade nodejs version.
Delete any package-lock.json or yarn-lock.json from the root folder.
Delete node_modules folder.
Delete .cache folder.
Run npm install or yarn install.
Hopefully, it will fix the issue, if it doesn't you can refer to the issues page of the library and more specifically on this issue

install "atom-beautify#0.33.0" failed

I have installed the atom-beautify packages and I received this notify:
gyp info it worked if it ends with ok
gyp info using node-gyp#3.4.0
gyp info using node#6.9.5 | win32 | x64
gyp http GET https://atom.io/download/electron/v2.0.5/iojs-v2.0.5.tar.gz
gyp http 200 https://atom.io/download/electron/v2.0.5/iojs-v2.0.5.tar.gz
gyp WARN install got an error, rolling back install
gyp ERR! install error
gyp ERR! stack Error: read ECONNRESET
gyp ERR! stack at exports._errnoException (util.js:1022:11)
gyp ERR! stack at TLSWrap.onread (net.js:569:26)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Users\\Quy Nguyen\\AppData\\Local\\atom\\app-1.30.0\\resources\\app\\apm\\bin\\node.exe" "C:\\Users\\Quy Nguyen\\AppData\\Local\\atom\\app-1.30.0\\resources\\app\\apm\\node_modules\\node-gyp\\bin\\node-gyp.js" "install" "--runtime=electron" "--target=2.0.5" "--dist-url=https://atom.io/download/electron" "--arch=x64" "--ensure"
gyp ERR! cwd C:\Users\Quy Nguyen\.atom
gyp ERR! node -v v6.9.5
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
But sometimes I have different output like that:
npm WARN deprecated graceful-fs#2.0.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated minimatch#0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch#0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated #types/commander#2.12.2: This is a stub types definition for commander (https://github.com/tj/commander.js). commander provides its own type definitions, so you don't need #types/commander installed!
npm WARN deprecated jscs-preset-wikimedia#1.0.1: Deprecated in favour of eslint-config-wikimedia. -- https://phabricator.wikimedia.org/T118941
npm WARN deprecated nomnom#1.8.1: Package no longer supported. Contact support#npmjs.com for more info.
npm ERR! Windows_NT 10.0.17134
npm ERR! argv "C:\\Users\\Quy Nguyen\\AppData\\Local\\atom\\app-1.30.0\\resources\\app\\apm\\bin\\node.exe" "C:\\Users\\Quy Nguyen\\AppData\\Local\\atom\\app-1.30.0\\resources\\app\\apm\\node_modules\\npm\\bin\\npm-cli.js" "--globalconfig" "C:\\Users\\Quy Nguyen\\.atom\\.apm\\.apmrc" "--userconfig" "C:\\Users\\Quy Nguyen\\.atom\\.apmrc" "install" "C:\\Users\\QUYNGU~1\\AppData\\Local\\Temp\\d-11882-10676-1pd8cj3.buptceg66r\\package.tgz" "--runtime=electron" "--target=2.0.5" "--arch=x64" "--global-style" "--msvs_version=2015"
npm ERR! node v6.9.5
npm ERR! npm v3.10.10
npm ERR! code EREADFILE
npm ERR! Error extracting C:\Users\Quy Nguyen\.atom\.apm\marko\4.13.3\package.tgz archive: ENOENT: no such file or directory, open 'C:\Users\Quy Nguyen\.atom\.apm\marko\4.13.3\package.tgz'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\QUYNGU~1\AppData\Local\Temp\apm-install-dir-11882-10676-1ak13y1.o2hmklz0k9\npm-debug.log
I cannot understand how it works.
Thanks for your helps!
I am using windows 10 64 bit. I almost ripped my head of falling install atom-beautify. I was receiving "npm ERR! zlib: unexpected end of file". I tried everything. At last I reinstalled atom then deleted the .apm file and finally was able to install atom-beautify package. Hope this information help someone.
On Linux/Mac, the issue is solved by taking the following steps:
Open terminal (Ctrl+Alt+T)
cd /home/your_username/.atom/.apm/marko
ln -s 4.13.4 4.13.3
apm install atom-beautify
On Windows, you can use Git Bash and taking the above steps.
Or, on Windows taking the following steps:
Open cmd/powershell
cd C:\Users\your_username\.atom\.apm\marko
mklink /J 4.13.3 4.13.4
apm install atom-beautify
After deleting the .apm folder I was able to install the atom-beautify package.
Yes this Works!
For MAC/LINUX:
Open terminal
cd /home/your_username/.atom/.apm/marko
ln -s 4.13.4 4.13.3
apm install atom-beautify
For WINDOWS :
Open cmd/powershell
cd C:\Users\your_username\.atom\.apm\marko
mklink /J 4.13.3 4.13.4
apm install atom-beautify
Turning off the Windows firewall and antivirus worked for me.

Grpc error while installing Firebase for React

I've been trying to fix this error for 2 days now. All I did to get the error was:
create-react-app appname
cd appname
npm install firebase --save (and that's the part that failed to install correctly)
These are the major fixes I've tried:
Installed latest version of Python 3 and added it to the windows path variable.
Manually downloaded grpc and added it to the project.
Updated Node to v10+.
I also tried other minor things not worth mentioning, but it didn't make a difference. None of them worked. I tried with multiple clean react apps so react wasn't the issue either.
C:\Users\Future\Desktop\react-turbo>npm i firebase --save
> grpc#1.10.1 install C:\Users\Future\Desktop\react-turbo\node_modules\grpc
> node-pre-gyp install --fallback-to-build --library=static_library
node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.10.1/node-v64-win32-x64-unknown.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for grpc#1.10.1 and node#10.0.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:\Users\Future\AppData\Local\Programs\Python\Python36-32\python.EXE", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:149:21)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--library=static_library" "--module=C:\\Users\\Future\\Desktop\\react-turbo\\node_modules\\grpc\\src\\node\\extension_binary\\node-v64-win32-x64-unknown\\grpc_node.node" "--module_name=grpc_node" "--module_path=C:\\Users\\Future\\Desktop\\react-turbo\\node_modules\\grpc\\src\\node\\extension_binary\\node-v64-win32-x64-unknown"
gyp ERR! cwd C:\Users\Future\Desktop\react-turbo\node_modules\grpc
gyp ERR! node -v v10.0.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --library=static_library --module=C:\Users\Future\Desktop\react-turbo\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=C:\Users\Future\Desktop\react-turbo\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\Future\Desktop\react-turbo\node_modules\grpc\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:947:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:236:5)
node-pre-gyp ERR! System Windows_NT 10.0.16299
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Future\\Desktop\\react-turbo\\node_modules\\grpc\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd C:\Users\Future\Desktop\react-turbo\node_modules\grpc
node-pre-gyp ERR! node -v v10.0.0
node-pre-gyp ERR! node-pre-gyp -v v0.7.0
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --library=static_library --module=C:\Users\Future\Desktop\react-turbo\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=C:\Users\Future\Desktop\react-turbo\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown' (1)
npm WARN ajv-keywords#3.2.0 requires a peer of ajv#^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc#1.10.1 install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grpc#1.10.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Future\AppData\Roaming\npm-cache\_logs\2018-05-07T15_01_00_277Z-debug.log
I will recommend that instead of installing node latest version (which might not be well supported by all libraries) try to use the v8.11 stable version.
Then there are couple of actions/trick to handle this thing:
You might be using Windows 10, so try to disable your antivirus and then try again. If on Linux try to use command sudo in start.
Check this as well: unable to install firebase tools cli using windows 10
And this: Error with npm install - a pre-gyp error
Additional Information
In reference to learning Firebase these might help you as well:
https://medium.com/quick-code/how-to-integrate-react-redux-and-firebase-in-3-simple-steps-c44804a6af38
https://www.codementor.io/yurio/all-you-need-is-react-firebase-4v7g9p4kf
I needed to downgrade node from 10.12 to 8.11
node -v
v10.12.0
npm install -g n
n 8.11.1
mode -v
v8.11.1
I don't know if this is relevant, but I was also getting similar errors.
I was trying to do install the firebase using expo (as recommended in the docs)
expo install firebase
and this was failing for me. I noticed that the issue was related to my package-lock.json where node-pre-gyp was getting added. Wasted some time, but finally the issue was resolved when I did a npm install (and not expo install)
Hope this helps people in the future.
npm install firebase --save

Insight into this error?

warning Error running install script for optional dependency: "/Users/blainerichardson/Programming/Tutorials/Udemy/React-The-Complete-Guide-Incl-Redux/react-person/node_modules/fsevents: Command failed.\nExit code: 1\nCommand: node install\nArguments: \nDirectory: /Users/blainerichardson/Programming/Tutorials/Udemy/React-The-Complete-Guide-Incl-Redux/react-person/node_modules/fsevents\nOutput:\nnode-pre-gyp info it worked if it ends with ok\nnode-pre-gyp info using node-pre-gyp#0.6.39\nnode-pre-gyp info using node#9.3.0 | darwin | x64\nnode-pre-gyp info check checked for \"/Users/blainerichardson/Programming/Tutorials/Udemy/React-The-Complete-Guide-Incl-Redux/react-person/node_modules/fsevents/lib/binding/Release/node-v59-darwin-x64/fse.node\" (not found)\nnode-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.1.2-node-v59-darwin-x64.tar.gz\nnode-pre-gyp http 404 https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.1.2-node-v59-darwin-x64.tar.gz\nnode-pre-gyp ERR! Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.1.2-node-v59-darwin-x64.tar.gz \nnode-pre-gyp ERR! Pre-built binaries not found for fsevents#1.1.2 and node#9.3.0 (node-v59 ABI, unknown) (falling back to source compile with node-gyp) \nnode-pre-gyp http 404 status code downloading tarball https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.1.2-node-v59-darwin-x64.tar.gz \nnode-pre-gyp ERR! build error \nnode-pre-gyp ERR! stack Error: Failed to execute 'node-gyp clean' (Error: spawn node-gyp ENOENT)\nnode-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/blainerichardson/Programming/Tutorials/Udemy/React-The-Complete-Guide-Incl-Redux/react-person/node_modules/node-pre-gyp/lib/util/compile.js:77:29)\nnode-pre-gyp ERR! stackat ChildProcess.emit (events.js:159:13)\nnode-pre-gyp ERR!stack at Process.ChildProcess._handle.onexit (internal/child_process.js:207:12)\nnode-pre-gyp ERR! stack at onErrorNT (internal/child_process.js:389:16)\nnode-pre-gyp ERR! stack at process._tickCallback (internal/process/next_tick.js:152:19)\nnode-pre-gyp ERR! System Darwin 17.3.0\nnode-pre-gyp ERR! command \"/usr/local/Cellar/node/9.3.0_1/bin/node\" \"/Users/blainerichardson/Programming/Tutorials/Udemy/React-The-Complete-Guide-Incl-Redux/react-person/node_modules/fsevents/node_modules/.bin/node-pre-gyp\" \"install\" \"--fallback-to-build\"\nnode-pre-gyp ERR! cwd /Users/blainerichardson/Programming/Tutorials/Udemy/React-The-Complete-Guide-Incl-Redux/react-person/node_modules/fsevents\nnode-pre-gyp ERR! node -v v9.3.0\nnode-pre-gyp ERR! node-pre-
Everytime I use yarn to install dependencies I receive this error. It adds them to the package.json file, so there is no problem getting the dependencies to work. I am just concerned this will have deeper implications later down the road when actually working on deploying a production version of a different project.

node-gyp troubles with installation

I'm trying to install webworker-threads, a node addon that requires gyp. I followed the gyp instructions for setup, so far I'm still getting an error when trying to "rebuild":
C:\Program Files\nodejs\node_modules\webworker-threads>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild
gyp ERR! configure error
gyp ERR! stack Error: spawn ENOENT
gyp ERR! stack at errnoException (child_process.js:980:11)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:771:34)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Program Files\nodejs\node_modules\webworker-threads
gyp ERR! node -v v0.10.8
gyp ERR! node-gyp -v v0.9.5
gyp ERR! not ok
npm ERR! weird error 1
npm ERR! not ok code 0
I'm on a Windows 7 32 bit system.
Sooo to spare some time here's my personal checklist:
Paths: node is in both user and system path. npm is in user path. Python path is set too.
Python: 2.7.3 installed at C:\Python27
VisualStudio C++ 2010 AND 2012 Express installed
node version v0.10.8
ran everything with administrator privileges
Commands executed: npm install -g node-gyp
npm install webworker-threads
Then the error appears.
Do you guys by any chance notice something I'm doing wrong?
Thanks a lot in advance for your guidance!
try npm install –msvs_version=2012. This command will ask NPM to use visual studio 2012 to build.
http://www.kevgriffin.com/specifying-visual-studio-version-in-npm-installs/
After spending a while to get this to work (for me accepted answer didn't work, for me it's just half solution) i did following:
Sadly, you must have visual studio (i installed express edition 2013 for DESKTOP)
Installed python 2.7.3 (you don't have to set any environment variables)
Run cmd as administrator and go to you project root (where is you package.json file)
First run: npm config set python C:\Python27\python.exe
Then: npm install -msvs_version=2013
The trick is in command npm config set python ...path_to_python_exe... which will be provided by npm to dependency which needs python i guess.
Got Windows 7 64 bit.
Did all the above but I still got the error which was mentioned.
What worked for me was:
Uninstall Microsoft .NET Frameworks (I got more than one version)
Open regedit and navigating to:
hkey_local_machine/software/Microsoft/MSBuild
Remove all .net versions (I got there 2 and 3.5 sub directories)
If You have OS 64 Bit repeat steps 2 & 3 for %WinDir%\SysWOW64\regedit.exe
Reinstall Microsoft .NET Framework
Hope it will spare some time for you.

Resources