Yeoman webapp generator error with sass - node.js

Followed the "Get Started" instruction of Yeoman and get the latest stable npm and bower. However I'm getting the following error when running npm install
`npm install
\> node-sass#3.2.0 install /Users/zifei/Dev/projects/Woyao-
web/node_modules/grunt-sass/node_modules/node-sass
\> node scripts/install.js
Cannot download "https://github.com/sass/node-sass/releases/download
/v3.2.0/darwin-x64-45_binding.node": HTTP error 404 Not Found
\> node-sass#3.2.0 postinstall /Users/zifei/Dev/projects/Woyao-
web/node_modules/grunt-sass/node_modules/node-sass
\> node scripts/build.js
Building: /Users/zifei/.nvm/versions/io.js/v3.0.0/bin/iojs
node_modules/pangyp/bin/node-gyp rebuild --libsass_ext= --libsass_cflags=
--libsass_ldflags= --libsass_library=
gyp: /Users/zifei/.node-gyp/3.0.0/common.gypi not found (cwd: /Users/zifei
/Dev/projects/Woyao-web/node_modules/grunt-sass/node_modules/node-sass)
while reading includes of binding.gyp while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/Users/zifei/Dev/projects
/Woyao-web/node_modules/grunt-sass/node_modules/node-sass/node_modules
/pangyp/lib/configure.js:345:16)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit
(internal/child_process.js:200:12)
gyp ERR! System Darwin 14.4.0
gyp ERR! command "/Users/zifei/.nvm/versions/io.js/v3.0.0/bin/iojs"
"/Users/zifei/Dev/projects/Woyao-web/node_modules/grunt-sass/node_modules
/node-sass/node_modules/pangyp/bin/node-gyp" "rebuild" "--libsass_ext="
"--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/zifei/Dev/projects/Woyao-web/node_modules/grunt-
sass/node_modules/node-sass
gyp ERR! node -v v3.0.0
gyp ERR! pangyp -v v2.2.1
gyp ERR! not ok
Build failed
npm ERR! Darwin 14.4.0
npm ERR! argv "/Users/zifei/.nvm/versions/io.js/v3.0.0/bin/iojs" "/Users
/zifei/.nvm/versions/io.js/v3.0.0/bin/npm" "install"
npm ERR! node v3.0.0
npm ERR! npm v2.13.3
npm ERR! code ELIFECYCLE
npm ERR! node-sass#3.2.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#3.2.0 postinstall script 'node
scripts/build.js'.
npm ERR! This is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node scripts/build.js
npm ERR! You can get their info via:
npm ERR! npm owner ls node-sass
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/zifei/Dev/projects/Woyao-web/npm-debug.log`

Not sure exactly what is happening here, but the issue is that your computer is unable to build a native module. You can know this because the error is coming from gyp which is the native binary builder for node.
What I'd do in your case is try with another version. I see here you're using io.js 3.0.0 which is not necessarily the most stable version out there. I'd suggest trying with either another io.js version or using node.js 0.12 until the official node 4.0 release.
You can also just update npm and retry. Sometime it can be a race condition issue.

Related

node-sass Issue on my angular project npm install (Mac OS)

I try to install node_modules for my angular project an I get issue for node-sass
I use mac os, node js version -> v16.13.2, node-sass version in project ->^4.14.1
In this image1 and image2 is package.json
The error that I get is :
npm ERR! 1 warning and 1 error generated.
npm ERR! make: *** [Release/obj.target/binding/src/binding.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.onExit (../node_modules/node-gyp/lib/build.js:262:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Darwin 20.6.0
npm ERR! gyp ERR! command "/usr/local/bin/node" ".../node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd .../node_modules/node-sass
npm ERR! gyp ERR! node -v v16.13.2
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
npm ERR! A complete log of this run can be found in:
npm ERR! .../.npm/_logs/2022-01-25T10_04_49_137Z-debug-0.log
I tied this commands npm install -g node-sass, npm uninstall -g node-sass
The same I tried to install latest version of node-sass
I found a solution to this problem. Simply to downgrade node version and it works
You might want to run npm upgrade to have npm check for outdated version of your dependencies.
Because for node 16 you need node-sass in version 6.0+
Just remove node-sass from your package.json ... that solved the problem for me

Running older version JointsWP

I have an older project running JointsWP 4. Somehow I can't run and compile anymore. Unfortunately this goes beyond my knowledge.
I've tried to run npm install again but it just trows up errors.
How do I get this project back up running?
Many thanks
...
gyp: No Xcode or CLT version detected!
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/Users/bramroos/Sites/alert/wp-content/themes/alert/node_modules/node-gyp/lib/configure.js:345:16)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 20.1.0
gyp ERR! command "/usr/local/bin/node" "/Users/bramroos/Sites/alert/wp-content/themes/alert/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/bramroos/Sites/alert/wp-content/themes/alert/node_modules/gulp-sass/node_modules/node-sass
gyp ERR! node -v v12.18.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass#3.13.1 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#3.13.1 postinstall 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! /Users/bramroos/.npm/_logs/2020-11-25T13_15_12_661Z-debug.log
The error messages indicate you are trying to use node-sass#3.13.1 with Node.js 12.18.0. The support table for node-sass says that Node.js 12.18.0 requires node-sass 4.12 or newer.
Judging from the support table, node-sass 3.x is entirely unsupported at this time. You can try to update node-sass to 4.x or you can use a Node.js version manager like nvm to try to build it with an older version of node.

Force npm compiling packages using docker image

I'm trying to start a Docker with an Ubuntu image and the installing zmq from npm.
It seems that when it executes the npm install it uses the kernel from my computer (Arch Linux 4.8.13) to compile the packages.
How could I force to use the image Ubuntu in the docker to compile the packages of the npm?
I let you here a screenshot with the result of the build and the Dockerfile
This is the content of /var/www/forum/npm-debug.log
> zmq#2.15.3 install /var/www/forum/node_modules/zmq
> node-gyp rebuild
/bin/sh: 1: node: not found
gyp: Call to 'node -e "require('nan')"' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:354:16)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit(internal/child_process.js:200:12)
gyp ERR! System Linux 4.8.13-1-ARCH
gyp ERR! command "/usr/bin/nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /var/www/forum/node_modules/zmq
gyp ERR! node -v v4.2.6
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN forum-sad#0.0.1 No repository field.
npm WARN forum-sad#0.0.1 No license field.
npm ERR! Linux 4.8.13-1-ARCH
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! zmq#2.15.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zmq#2.15.3 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the zmq package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs zmq
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls zmq
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /var/www/forum/npm-debug.log

Can't install node-sass package via npm

I recently used Chromebrew to install Node v4.4.0 on my Chromebook.
The node install went through great, and all of my packages installed with the exception of gulp-sass, which is dependent on node-sass.
This is the error I get after running npm install node-sass
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/chronos/user/druid/node_modules/node-sass/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 3.10.18
gyp ERR! command "/usr/local/bin/node" "/home/chronos/user/druid/node_modules/node-sass/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /home/chronos/user/druid/node_modules/node-sass
gyp ERR! node -v v4.4.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
Build failed
npm ERR! Linux 3.10.18
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "node-sass"
npm ERR! node v4.4.0
npm ERR! npm v2.14.20
npm ERR! code ELIFECYCLE
npm ERR! node-sass#3.4.2 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#3.4.2 postinstall script 'node scripts/build.js'.
npm ERR! This is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node scripts/build.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs node-sass
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls node-sass
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/chronos/user/druid/npm-debug.log
Any ideas why I am running into this issue?
that doesn't seem to contain the actual log. all it says is Error: make failed with exit code: 2. but if it's running make, it most likely is trying to compile code, and that requires a C/C++ compiler, and that isn't available under Chrome OS currently. you'd need to install a distro into a chroot like crouton.

Error on `node-gyp rebuild` on the `base64#2.1.0 install`

Running 'sudo npm install' on MAC, I got the error about node-gyp rebuild on the base64#2.1.0 install. Any way to resolve this problem? Please help.
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 69
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Darwin 13.4.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/jepeng/Documents/huron/wx2-admin-web-client/node_modules/base64
gyp ERR! node -v v0.10.32
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm ERR! base64#2.1.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the base64#2.1.0 install script.
npm ERR! This is most likely a problem with the base64 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls base64
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 13.4.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/jepeng/Documents/huron/wx2-admin-web-client
npm ERR! node -v v0.10.32
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0
I have resolved this issue by using older version of node v0.10.40
I was facing similar issue.
Followed the following steps to fix it on MacOS highSierra 10.13:
Downloaded command line tools (MacOS 10.13) for xcode and installed it. Download it from "https://developer.apple.com/download/more/"
Installed xcode 10.0 from the app store. Opened xcode and went through the regular configuration xcode does in the initial start up.
After this it started giving "xcode-select" path issue as stated in the description above. On running command "xcode-select --print-path" it was showing path as '/ Library/Developer/CommandLineTools', so i went ahead and tried "xcode-select --reset" after which the path changed to "/Applications/Xcode.app/Contents/Developer". Immediately after it the build started working without any issues.

Resources