Trying to get a project built on Ruby to run locally but I'm running into an issue (or a few) node-sass: command failed when running yarn install. After that it goes downhill.
I have installed Node, Ruby, Rails, etc but I can't find a solution for that. I've tried to install node-sass via npm then running yarn install once again to install the other dependencies, but I got the same result...
I got this error below:
error /home/fernie/theodinproject/node_modules/node-sass: Command failed.
Exit code: 1
Command: node scripts/build.js
Arguments:
Directory: /home/fernie/theodinproject/node_modules/node-sass
Output:
Building: /home/fernie/.nvm/versions/node/v15.14.0/bin/node /home/fernie/theodinproject/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli '/home/fernie/.nvm/versions/node/v15.14.0/bin/node',
gyp verb cli '/home/fernie/theodinproject/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library='
gyp verb cli ]
gyp info using node-gyp#3.8.0
gyp info using node#15.14.0 | linux | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed at getNotFoundError (/home/fernie/theodinproject/node_modules/which/which.js:13:12)
gyp verb `which` failed at F (/home/fernie/theodinproject/node_modules/which/which.js:68:19)
gyp verb `which` failed at E (/home/fernie/theodinproject/node_modules/which/which.js:80:29)
gyp verb `which` failed at /home/fernie/theodinproject/node_modules/which/which.js:89:16
gyp verb `which` failed at /home/fernie/theodinproject/node_modules/isexe/index.js:42:5
gyp verb `which` failed at /home/fernie/theodinproject/node_modules/isexe/mode.js:8:5
gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:193:21)
gyp verb `which` failed python2 Error: not found: python2
gyp verb `which` failed at getNotFoundError (/home/fernie/theodinproject/node_modules/which/which.js:13:12)
gyp verb `which` failed at F (/home/fernie/theodinproject/node_modules/which/which.js:68:19)
gyp verb `which` failed at E (/home/fernie/theodinproject/node_modules/which/which.js:80:29)
gyp verb `which` failed at /home/fernie/theodinproject/node_modules/which/which.js:89:16
gyp verb `which` failed at /home/fernie/theodinproject/node_modules/isexe/index.js:42:5
gyp verb `which` failed at /home/fernie/theodinproject/node_modules/isexe/mode.js:8:5
gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:193:21) {
gyp verb `which` failed code: 'ENOENT'
gyp verb `which` failed }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python /usr/bin/python
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /usr/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "<string>", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (node:child_process:326:12)
gyp ERR! stack at ChildProcess.emit (node:events:369:20)
gyp ERR! stack at maybeClose (node:internal/child_process:1067:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
gyp ERR! System Linux 5.8.0-50-generic
gyp ERR! command "/home/fernie/.nvm/versions/node/v15.14.0/bin/node" "/home/fernie/theodinproject/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /home/fernie/theodinproject/node_modules/node-sass
gyp ERR! node -v v15.14.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
package.json
{
"license": "MIT",
"scripts": {
"test": "jest --coverage",
"eslint": "eslint --max-warnings 0 './app/javascript/**/*'"
},
"dependencies": {
"#babel/preset-react": "^7.13.13",
"#hookform/resolvers": "^0.1.1",
"#rails/ujs": "^6.1.3",
"#rails/webpacker": "5.2.1",
"#sentry/browser": "^6.2.5",
"axios": "^0.21.1",
"babel-plugin-prismjs": "^2.0.1",
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
"bootstrap": "^4.5.3",
"core-js": "^3.10.1",
"hint.css": "^2.6.0",
"jquery": "^3.6.0",
"js-base64": "^3.6.0",
"node-sass": "^4.14.1",
"popper.js": "^1.16.1",
"prismjs": "^1.23.0",
"prop-types": "^15.7.2",
"react": "^16.14.0",
"react_ujs": "^2.6.1",
"react-dom": "^16.14.0",
"react-flip-move": "^3.0.4",
"react-hook-form": "^6.15.1",
"react-scrolllock": "^5.0.1",
"react-tabs": "^3.2.2",
"regenerator-runtime": "^0.13.7",
"stickyfilljs": "^2.1.0",
"toaster": "^0.1.2",
"turbolinks": "^5.2.0",
"validate.js": "^0.13.1",
"yup": "^0.32.9"
},
"devDependencies": {
"#testing-library/jest-dom": "^5.11.10",
"#testing-library/react": "^11.2.6",
"eslint": "^7.24.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-react": "^7.23.2",
"eslint-plugin-react-hooks": "^4.2.0",
"jest": "^26.6.3",
"webpack-dev-server": "^3.11.2"
},
"jest": {
"clearMocks": true,
"testPathIgnorePatterns": [
"<rootDir>/config/",
"/node_modules/",
"/vendor/"
],
"setupFilesAfterEnv": [
"<rootDir>/setupTests.js"
]
}
}
It seems that node-sass is a webpacker dependency, right? Because this happens after yarn runs #rails/webpacker.
Everything is up-to-date I think
$ node -v
v15.14.0
$ node-sass -v
node-sass 5.0.0 (Wrapper) [JavaScript]
libsass 3.5.5 (Sass Compiler) [C/C++]
$ yarn -v
1.22.10
$ ruby -v
ruby 2.6.6p146 (2020-03-31 revision 67876) [x86_64-linux]
$ rails -v
Rails 6.1.3.1
$ node-gyp -v
v8.0.0
Does anyone have any idea what could be causing this?
It's my first time contributing to a Ruby project and I don't wanna mess up. I appreciate any help
Related
I'm kinda at my wits end here. I'm working on a localhost and every time I try to start the server it tells me to run yarn install, but when I try and run yarn install I get an error like this:
20 warnings and 6 errors generated.
20 warnings and 6 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/robertgervais/projects/bike_index/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/robertgervais/projects/bike_index/node_modules/node-gyp/bin/node-gyp.js\" \"build\" \"--fallback-to-build\" \"--module=/Users/robertgervais/projects/bike_index/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node\" \"--module_name=fse\" \"--module_path=/Users/robertgervais/projects/bike_index/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64\" \"--napi_version=4\" \"--node_abi_napi=napi\"
gyp ERR! cwd /Users/robertgervais/projects/bike_index/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/robertgervais/projects/bike_index/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/robertgervais/projects/bike_index/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node --module_name=fse --module_path=/Users/robertgervais/projects/bike_index/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/robertgervais/projects/bike_index/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/robertgervais/projects/bike_index/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp\" \"install\" \"--fallback-to-build\"
node-pre-gyp ERR! cwd /Users/robertgervais/projects/bike_index/node_modules/fsevents
node-pre-gyp ERR! node -v v12.1.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.3
node-pre-gyp ERR! not ok
make: *** [Release/obj.target/fse/fsevents.o] Error 1
Failed to execute '/usr/local/Cellar/node/12.1.0/bin/node /Users/robertgervais/projects/bike_index/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/robertgervais/projects/bike_index/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node --module_name=fse --module_path=/Users/robertgervais/projects/bike_index/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64 --napi_version=4 --node_abi_napi=napi' (1)
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/robertgervais/projects/bike_index/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/robertgervais/projects/bike_index/node_modules/node-gyp/bin/node-gyp.js\" \"build\" \"--fallback-to-build\" \"--module=/Users/robertgervais/projects/bike_index/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node\" \"--module_name=fse\" \"--module_path=/Users/robertgervais/projects/bike_index/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64\" \"--napi_version=4\" \"--node_abi_napi=napi\"
gyp ERR! cwd /Users/robertgervais/projects/bike_index/node_modules/fsevents
gyp ERR! node -v v12.1.0
gyp ERR! node-gyp -v v3.8.0
I've sort of been scouring stack for a while now trying to find a fix, but I'm not having any luck.
Please point me in the right direction
I just had the same issue. It appears that a remote url for the version of fsevents that my yarn.lock file was referencing was giving a 404. I was able to fix this by running yarn upgrade-interactive and updating all my packages to the latest version. This updated fsevent to 1.2.9 and fixed the error.
I noticed I also had the following in my console before the error message you gave:
$ yarn
yarn install v1.15.2
[1/4] π Resolving packages...
[2/4] π Fetching packages...
[3/4] π Linking dependencies...
[4/4] π¨ Building fresh packages...
[1/2] β’ fsevents
warning Error running install script for optional dependency: "/my_project_folder/node_modules/fsevents: Command failed.
Exit code: 1
Command: node install
Arguments:
Directory: /my_project_folder/node_modules/fsevents
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp#0.10.3
node-pre-gyp info using node#12.1.0 | darwin | x64
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp info check checked for \"/my_project_folder/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node\" (not found)
node-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.7/fse-v1.2.7-node-v72-darwin-x64.tar.gz
node-pre-gyp http 404 https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.7/fse-v1.2.7-node-v72-darwin-x64.tar.gz
node-pre-gyp WARN Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.7/fse-v1.2.7-node-v72-darwin-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for fsevents#1.2.7 and node#12.1.0 (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp http 404 status code downloading tarball https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.7/fse-v1.2.7-node-v72-darwin-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not installable for fsevents#1.2.7 and node#12.1.0 (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error Connection closed while downloading tarball file
the following command will help you to get rid of the problem
yarn cache clean && yarn upgrade && yarn
I have an ionic app working on Android and now I need to make the iOS version.
At work, they gave me a Mac to do this.
I cloned the project from GitHub and then, I tried to install all the dependencies.
But I have a problem. When I run npm install I get:
> grpc#1.10.1 install /Users/ivanlencina/dev/animaedu/pausa/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-darwin-x64-unknown.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for grpc#1.10.1 and node#10.14.2 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Pre-built binaries not installable for grpc#1.10.1 and node#10.14.2 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Hit error Connection closed while downloading tarball file
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o
rm: ./Release/.deps/Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o.d.raw: No such file or directory
make: *** [Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/Cellar/node#10/10.14.2/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/Cellar/node#10/10.14.2/bin/node" "/usr/local/Cellar/node#10/10.14.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/Users/ivanlencina/dev/animaedu/pausa/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node" "--module_name=grpc_node" "--module_path=/Users/ivanlencina/dev/animaedu/pausa/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown"
gyp ERR! cwd /Users/ivanlencina/dev/animaedu/pausa/node_modules/grpc
gyp ERR! node -v v10.14.2
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#10/10.14.2/bin/node /usr/local/Cellar/node#10/10.14.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/Users/ivanlencina/dev/animaedu/pausa/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node --module_name=grpc_node --module_path=/Users/ivanlencina/dev/animaedu/pausa/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/ivanlencina/dev/animaedu/pausa/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:962:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
node-pre-gyp ERR! System Darwin 17.7.0
node-pre-gyp ERR! command "/usr/local/Cellar/node#10/10.14.2/bin/node" "/Users/ivanlencina/dev/animaedu/pausa/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /Users/ivanlencina/dev/animaedu/pausa/node_modules/grpc
node-pre-gyp ERR! node -v v10.14.2
node-pre-gyp ERR! node-pre-gyp -v v0.7.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/Cellar/node#10/10.14.2/bin/node /usr/local/Cellar/node#10/10.14.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/Users/ivanlencina/dev/animaedu/pausa/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node --module_name=grpc_node --module_path=/Users/ivanlencina/dev/animaedu/pausa/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown' (1)
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/avl/avl.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/backoff/backoff.oe
In file included from ../deps/grpc/src/core/lib/backoff/backoff.cc:19:iled to e
In file included from ../deps/grpc/src/core/lib/backoff/backoff.h:22:
../deps/grpc/src/core/lib/iomgr/exec_ctx.h:23:10: fatal error:
'grpc/support/cpu.h' file not found
#include <grpc/support/cpu.h>
^~~~~~~~~~~~~~~~~~~~
1 error generated.ββΈ© β ΄ install: info lifecycle grpc#1.10.1~install: Failed to e
make: *** [Release/obj.target/grpc/deps/grpc/src/core/lib/backoff/backoff.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/Cellar/node#10/10.14.2/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/Cellar/node#10/10.14.2/bin/node" "/usr/local/Cellar/node#10/10.14.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/Users/ivanlencina/dev/animaedu/pausa/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node" "--module_name=grpc_node" "--module_path=/Users/ivanlencina/dev/animaedu/pausa/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown"
gyp ERR! cwd /Users/ivanlencina/dev/animaedu/pausa/node_modules/grpc
gyp ERR! node -v v10.14.2
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN ajv-keywords#2.1.1 requires a peer of ajv#^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ngx-toastr#8.10.2 requires a peer of rxjs#^6.0.0 but none is installed. You must install peer dependencies yourself.
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.
I tried to remove node and install it with brew.
I tried to reinstall npm and reinstall that dependency called grpc but it still having problems..
Any ideas?
Thanks in advance.
The version of grpc referenced there (1.10) is old enough that it does not support the version of Node you are using (10). You will need to either downgrade your Node runtime to an older version or get that library to depend on a newer version of grpc in order to use it.
I created a test project for the issue.
https://github.com/ivandejanovic/test
When I try do build a docker image on Ubuntu 18.04 all goes ok, but when I try on macOS 10.13.4
I get this error:
> snappy#6.0.4 install /usr/src/app/node_modules/snappy
> node-gyp rebuild
make: Entering directory '/usr/src/app/node_modules/snappy/build'
CXX(target) Release/obj.target/snappy/deps/snappy/snappy-1.1.7/snappy-sinksource.o
CXX(target) Release/obj.target/snappy/deps/snappy/snappy-1.1.7/snappy-stubs-internal.o
CXX(target) Release/obj.target/snappy/deps/snappy/snappy-1.1.7/snappy.o
AR(target) Release/obj.target/deps/snappy/snappy.a
COPY Release/snappy.a
CXX(target) Release/obj.target/binding/src/binding.o
In file included from ../src/./binding.h:3:0,
from ../src/binding.cc:1:
/root/.node-gyp/10.2.0/include/node/node.h:53:50: fatal error: core.h:
No such file or directory
#include "core.h" // NOLINT(build/include_order)
^
compilation terminated.
make: Leaving directory '/usr/src/app/node_modules/snappy/build'
make: *** [binding.target.mk:102:
Release/obj.target/binding/src/binding.o] 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:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit
(internal/child_process.js:237:12)
gyp ERR! System Linux 4.9.87-linuxkit-aufs
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 /usr/src/app/node_modules/snappy
gyp ERR! node -v v10.2.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Could be related to this issue:
https://github.com/Blizzard/node-rdkafka/issues/292
Any idea how to resolve this on Mac?
Issue was the old node:10-alpine image that was using node 10.2.0. Once I deleted it my mac downloaded the latest image with node 10.2.1 and everything worked. My Ubuntu laptop didn't have the old image that is probably why it worked there immediately.
I need to use apiary to consume API's. Before installing dredd i have installed Node and npm.
Now when i try to execute "npm install -g dredd"
I get following error :
make: *** [Release/obj.target/protagonist/src/annotation.o] 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:270:23)
gyp ERR! stack at emitTwo (events.js:88:13)
gyp ERR! stack at ChildProcess.emit (events.js:173:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:201:12)
gyp ERR! System Darwin 14.5.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 /usr/local/lib/node_modules/dredd/node_modules/protagonist
gyp ERR! node -v v5.2.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN install:protagonist#0.20.1 protagonist#0.20.1 install: `node-gyp rebuild`
npm WARN install:protagonist#0.20.1 Exit status 1
> spawn-sync#1.0.14 postinstall /usr/local/lib/node_modules/dredd/node_modules/spawn-sync
> node postinstall
/usr/local/lib
βββ (empty)
npm ERR! code 1
Can anyone help regarding this ?
Unfortunately dredd is not compatible with any nodejs >= 4.0 version, but it is definitely on our roadmap.
Dredd now supports all recent versions of Node. Since version 1.4.0 Dredd also doesn't need C++ compiler or anything like that during installation. I hope you can now install it on Mac without any problems!
I removed my node installation via brew and followed the steps on the React getting started page to install iojs. Before I updated npm via brew also. React Native installs properly, but as soon as I try to init an app via
react-native init my_app
I get the following trace:
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: 404 response dowloading http://nodejs.org/dist/v2.3.4/node-v2.3.4.tar.gz
gyp ERR! stack at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:251:14)
gyp ERR! stack at emitOne (events.js:82:20)
gyp ERR! stack at Request.emit (events.js:169:7)
gyp ERR! stack at Request.onRequestResponse (/usr/local/lib/node_modules/npm/node_modules/request/request.js:985:10)
gyp ERR! stack at emitOne (events.js:77:13)
gyp ERR! stack at ClientRequest.emit (events.js:169:7)
gyp ERR! stack at HTTPParser.parserOnIncomingClient (_http_client.js:415:21)
gyp ERR! stack at HTTPParser.parserOnHeadersComplete (_http_common.js:88:23)
gyp ERR! stack at Socket.socketOnData (_http_client.js:305:20)
gyp ERR! stack at emitOne (events.js:77:13)
gyp ERR! System Darwin 14.3.0
gyp ERR! command "/usr/local/Cellar/iojs/2.3.4/bin/iojs" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/jason/projects/dos/node_modules/react-native/node_modules/babel/node_modules/chokidar/node_modules/fsevents
gyp ERR! node -v v2.3.4
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
Re-installation of node-gyp does not solve the issue.
What did I do wrong?
This is a problem with io.js and node-gyp. See this line in your logs:
Error: 404 response dowloading http://nodejs.org/dist/v2.3.4/node-v2.3.4.tar.gz
node-gyp tries to download v2.3.4 distribution from node.js site, but it's obviously not there since it's io.js. To fix this io.js is shipped patched npm. Unfortunately, if you update npm via npm install -g npm it will be broken again.
You can try npm uninstall -g npm but it seems to just wipe npm entirely, so you have to reinstall io.js.