ERR! build error when I tried use a template - macos

I try to use a Vue template, but when I try to run npm install, I get this errors:
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
npm ERR! node-sass#6.0.1 postinstall: node scripts/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#6.0.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I tried deleting node_modules and package-lock.json and re running npm install, but this doesn’t work.

Related

Why laravel mix copy function does not work?

im tryng to make a copy of a js file that exist in node_modules to the public folder to try to use the javascript files on node_modules only when i need in specific parts of the system.
when i try to make a copy using mix.copy('node_modules/select2/dist/select2.min.js', 'public/vendor/js/'). the error i get is:
[webpack-cli] [Error: ENOENT: no such file or directory, lstat 'C:\laragon\www\project\node_modules\select2\dist\select2.min.js'] {
errno: -4058,
code: 'ENOENT',
syscall: 'lstat',
path: 'C:\\laragon\\www\\project\\node_modules\\select2\\dist\\select2.min.js'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! # development: `mix`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the # development 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\OfficeUser\AppData\Roaming\npm-cache\_logs\2023-01-10T15_51_48_679Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! # dev: `npm run development`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the # dev 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\OfficeUser\AppData\Roaming\npm-cache\_logs\2023-01-10T15_51_48_721Z-debug.log
What should i do now, is the file path incorrectly written?

Unable to install sodium to Heroku

I've tried running npm install sodium in the Heroku console but it just returns
npm ERR! code 1
npm ERR! path /app/node_modules/sodium
npm ERR! command failed
npm ERR! command sh -c node install.js --preinstall
npm ERR! Static libsodium was not found at /app/node_modules/sodium/deps/build/lib/libsodium so compiling libsodium from source.
npm ERR! libtool is required, but wasn't found on this system
npm ERR! make: *** [Makefile:62: libsodium] Error 1
npm ERR! /app/node_modules/sodium/install.js:293
npm ERR! throw new Error(cmdLine + ' exited with code ' + code);
npm ERR! ^
npm ERR!
npm ERR! Error: make libsodium exited with code 2
npm ERR! at ChildProcess.<anonymous> (/app/node_modules/sodium/install.js:293:19)
npm ERR! at ChildProcess.emit (node:events:394:28)
npm ERR! at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! A complete log of this run can be found in:
npm ERR! /app/.npm/_logs/2021-08-10T23_25_41_425Z-debug.log
I was led to believe Heroku has libtool installed so I don't see why I can't install sodium.

Getting error when running command npm install cypress --save-dev

Getting below error when running command npm install cypress --save-dev
npm ERR! path C:\Windows\system32\cmd.exe;BrowserServers\chromedriver.exe
npm ERR! errno ENOENT
npm ERR! cypress#4.12.1 postinstall: node index.js --exec install
npm ERR! spawn C:\Windows\system32\cmd.exe;BrowserServers\chromedriver.exe ENOENT
npm ERR!
npm ERR! Failed at the cypress#4.12.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! C:\Users\Admin\AppData\Roaming\npm-cache_logs\2020-08-07T12_33_09_219Z-debug.log
NOTE : Have run npm-init and package.json is created
node -v
v12.18.3
npm -v
6.14.6
also have set NODE_HOME Env variable
check you using Node.js 8 and above

How to resolve problem with webpack in angular universal project?

when i am converting angular project to universal. webpack is installed automatically then when i'm trying to build for ssr it is showing message that webpack-cli and webpack-command both are installed. then i uninstalled one of then still it is not working. also node dist/server command is not recognized by angular-cli.
please help..
I tried to uninstall webpack-cli.
× 「webpack」: Flags were specified that were not recognized:
--colors Not sure what you mean there
Please check the command executed.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sample-project#0.0.0 compile:server: webpack --config webpack.server.config.js --progress --colors
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sample-project#0.0.0 compile:server 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\gpw\AppData\Roaming\npm-cache_logs\2019-06-13T05_17_21_908Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sample-project#0.0.0 build:ssr: npm run build:client-and-server-bundles && npm run compile:server
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sample-project#0.0.0 build:ssr 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\gpw\AppData\Roaming\npm-cache_logs\2019-06-13T05_17_21_995Z-debug.log

Node.js install canvas failed on mac osx 10.8.4 : src/Canvas.h.....fatal error: v8.h file not found

I install nodejs following nodejs wiki, it's going well, and then install node canvas following this way https://github.com/LearnBoost/node-canvas/wiki/Installation---OSX, the steps before "$ npm install canvas" were going well, but the final step "$ npm install canvas" was failed again and again, I have tried install the Nodejs both building and installing, and i also try "sudo", and I have try "$ export PKG_CONFIG_PATH=.....", but still can't install canvas, I'm sure I have followed all the guide clarely.
Below is the log:
SLMacs-MacBook-Pro-2:~ percy$ npm install canvas
npm http GET https://registry.npmjs.org/canvas
npm http 304 https://registry.npmjs.org/canvas
> canvas#1.0.3 install /Users/macbookpro/node_modules/canvas
> node-gyp rebuild
CXX(target) Release/obj.target/canvas/src/Canvas.o
In file included from ../src/Canvas.cc:7:
../src/Canvas.h:11:10: fatal error: 'v8.h' file not found
#include <v8.h>
^
1 error generated.
make: *** [Release/obj.target/canvas/src/Canvas.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/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:96:17)
gyp ERR! stack at Process._handle.onexit (child_process.js:678:10)
gyp ERR! System Darwin 12.4.0
gyp ERR! command "node" "/usr/local/bin/node-gyp" "rebuild"
gyp ERR! cwd /Users/macbookpro/node_modules/canvas
gyp ERR! node -v v0.8.12
gyp ERR! node-gyp -v v0.10.6
gyp ERR! not ok
npm ERR! canvas#1.0.3 install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the canvas#1.0.3 install script.
npm ERR! This is most likely a problem with the canvas 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 canvas
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 12.4.0
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "canvas"
npm ERR! cwd /Users/macbookpro
npm ERR! node -v v0.8.12
npm ERR! npm -v 1.1.63
npm ERR! code ELIFECYCLE
npm ERR! Error: EACCES, open 'npm-debug.log'
npm ERR! { [Error: EACCES, open 'npm-debug.log'] errno: 3, code: 'EACCES', path: 'npm-debug.log' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Darwin 12.4.0
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "canvas"
npm ERR! cwd /Users/macbookpro
npm ERR! node -v v0.8.12
npm ERR! npm -v 1.1.63
npm ERR! path npm-debug.log
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, open 'npm-debug.log'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/macbookpro/npm-debug.log
npm ERR! not ok code 0
I just ran into this problem myself. You may need to install some dependencies. Try running the following command in terminal.
brew install pkg-config cairo pango libpng jpeg giflib librsvg
Afterwards, rerun npm install. This worked for me.
To fix it:
Download the source code of node 0.10.13 from http://nodejs.org/dist/v0.10.13/node-v0.10.13.tar.gz
Extract this file via tar -xvz node-v0.10.13.tar.gz
Copy the 'deps', 'src' and 'tools' folders into '~/.node-gyp/0.10.13'
Then run 'npm install canvas' again.
I have no idea why the MacOS node package(just for v0.10.13) is missing these things.

Resources