npm error when trying to install packages from package.json - node.js

so i was trying to install my npm packages from my project (package.json).
(The package got pulled from my github repo via git pull)
But when i tried to run npm i i get the error below:
Info:
Linux Debian 10
Node v17.5.0
npm 8.4.1
Full Error:
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated discord-api-types#0.26.1: No longer supported. Install the latest release!
npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command /usr/bin/node /usr/lib/node_modules/npm/bin/npm-cli.js install --force --cache=/home/vara/.npm --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm WARN old lockfile
npm ERR! npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm ERR! npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm ERR! npm WARN old lockfile
npm ERR! npm WARN old lockfile This is a one-time fix-up, please be patient...
npm ERR! npm WARN old lockfile
npm ERR! npm WARN deprecated ini#1.3.5: Please update to ini >=1.3.6 to avoid a prototype pollution issue
npm ERR! npm WARN deprecated os-homedir#2.0.0: This is not needed anymore. Use `require('os').homedir()` instead.
npm ERR! npm WARN deprecated flatten#1.0.2: flatten is deprecated in favor of utility frameworks such as lodash.
npm ERR! npm WARN deprecated rollup-plugin-buble#0.19.8: This module has been deprecated and is no longer maintained. Please use #rollup/plugin-buble.
npm ERR! npm WARN deprecated rollup-plugin-alias#1.5.2: This module has moved and is now available at #rollup/plugin-alias. Please update your dependencies. This version is no longer maintained.
npm ERR! npm WARN deprecated browserslist#1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm ERR! npm WARN deprecated rollup-plugin-json#3.1.0: This module has been deprecated and is no longer maintained. Please use #rollup/plugin-json.
npm ERR! npm WARN deprecated rollup-plugin-node-resolve#4.2.4: This package has been deprecated and is no longer maintained. Please use #rollup/plugin-node-resolve.
npm ERR! npm WARN deprecated debug#4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm ERR! npm WARN deprecated rollup-plugin-babel#4.3.3: This package has been deprecated and is no longer maintained. Please use #rollup/plugin-babel.
npm ERR! npm WARN deprecated mkdirp#0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm ERR! npm WARN deprecated rollup-plugin-commonjs#9.3.4: This package has been deprecated and is no longer maintained. Please use #rollup/plugin-commonjs.
npm ERR! npm WARN deprecated #babel/polyfill#7.4.4: 🚨 This package has been deprecated in favor of separate inclusion of a polyfill and regenerator-runtime (when needed). See the #babel/polyfill docs (https://babeljs.io/docs/en/babel-polyfill) for more information.
npm ERR! npm WARN deprecated svgo#0.7.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm ERR! npm WARN deprecated svgo#1.3.0: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm ERR! npm WARN deprecated iltorb#2.4.3: The zlib module provides APIs for brotli compression/decompression starting with Node.js v10.16.0, please use it over iltorb
npm ERR! npm WARN deprecated core-js#2.6.9: core-js#<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path /home/vara/.npm/_cacache/tmp/git-clonejK1p2j/node_modules/iltorb
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command sh -c node ./scripts/install.js || node-gyp rebuild
npm ERR! npm ERR! make: Entering directory '/home/vara/.npm/_cacache/tmp/git-clonejK1p2j/node_modules/iltorb/build'
npm ERR! npm ERR! CC(target) Release/obj.target/iltorb/brotli/c/common/dictionary.o
npm ERR! npm ERR! CC(target) Release/obj.target/iltorb/brotli/c/common/transform.o
npm ERR! npm ERR! CC(target) Release/obj.target/iltorb/brotli/c/dec/bit_reader.o
npm ERR! npm ERR! CC(target) Release/obj.target/iltorb/brotli/c/dec/decode.o
npm ERR! npm ERR! CC(target) Release/obj.target/iltorb/brotli/c/dec/huffman.o
npm ERR! npm ERR! CC(target) Release/obj.target/iltorb/brotli/c/dec/state.o
npm ERR! npm ERR! CC(target) Release/obj.target/iltorb/brotli/c/enc/backward_references.o
npm ERR! npm ERR! CC(target) Release/obj.target/iltorb/brotli/c/enc/backward_references_hq.o
npm ERR! npm ERR! CC(target) Release/obj.target/iltorb/brotli/c/enc/bit_cost.o
npm ERR! npm ERR! CC(target) Release/obj.target/iltorb/brotli/c/enc/block_splitter.o
npm ERR! npm ERR! CC(target) Release/obj.target/iltorb/brotli/c/enc/brotli_bit_stream.o
npm ERR! npm ERR! CC(target) Release/obj.target/iltorb/brotli/c/enc/cluster.o
npm ERR! npm ERR! CC(target) Release/obj.target/iltorb/brotli/c/enc/compress_fragment.o
npm ERR! npm ERR! CC(target) Release/obj.target/iltorb/brotli/c/enc/compress_fragment_two_pass.o
npm ERR! npm ERR! CC(target) Release/obj.target/iltorb/brotli/c/enc/dictionary_hash.o
npm ERR! npm ERR! CC(target) Release/obj.target/iltorb/brotli/c/enc/encode.o
npm ERR! npm ERR! CC(target) Release/obj.target/iltorb/brotli/c/enc/encoder_dict.o
npm ERR! npm ERR! CC(target) Release/obj.target/iltorb/brotli/c/enc/entropy_encode.o
npm ERR! npm ERR! CC(target) Release/obj.target/iltorb/brotli/c/enc/histogram.o
npm ERR! npm ERR! CC(target) Release/obj.target/iltorb/brotli/c/enc/literal_cost.o
npm ERR! npm ERR! CC(target) Release/obj.target/iltorb/brotli/c/enc/memory.o
npm ERR! npm ERR! CC(target) Release/obj.target/iltorb/brotli/c/enc/metablock.o
npm ERR! npm ERR! CC(target) Release/obj.target/iltorb/brotli/c/enc/static_dict.o
npm ERR! npm ERR! CC(target) Release/obj.target/iltorb/brotli/c/enc/utf8_util.o
npm ERR! npm ERR! CXX(target) Release/obj.target/iltorb/src/common/allocator.o
npm ERR! npm ERR! make: Leaving directory '/home/vara/.npm/_cacache/tmp/git-clonejK1p2j/node_modules/iltorb/build'
npm ERR! npm ERR! info install installing standalone, skipping download.
npm ERR! npm ERR! gyp info it worked if it ends with ok
npm ERR! npm ERR! gyp info using node-gyp#8.4.1
npm ERR! npm ERR! gyp info using node#17.5.0 | linux | x64
npm ERR! npm ERR! gyp info find Python using Python version 3.7.3 found at "/usr/bin/python3"
npm ERR! npm ERR! gyp info spawn /usr/bin/python3
npm ERR! npm ERR! gyp info spawn args [
npm ERR! npm ERR! gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! npm ERR! gyp info spawn args '-f',
npm ERR! npm ERR! gyp info spawn args 'make',
npm ERR! npm ERR! gyp info spawn args '-I',
npm ERR! npm ERR! gyp info spawn args '/home/vara/.npm/_cacache/tmp/git-clonejK1p2j/node_modules/iltorb/build/config.gypi',
npm ERR! npm ERR! gyp info spawn args '-I',
npm ERR! npm ERR! gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! npm ERR! gyp info spawn args '-I',
npm ERR! npm ERR! gyp info spawn args '/home/vara/.cache/node-gyp/17.5.0/include/node/common.gypi',
npm ERR! npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! npm ERR! gyp info spawn args '-Dnode_root_dir=/home/vara/.cache/node-gyp/17.5.0',
npm ERR! npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! npm ERR! gyp info spawn args '-Dnode_lib_file=/home/vara/.cache/node-gyp/17.5.0/<(target_arch)/node.lib',
npm ERR! npm ERR! gyp info spawn args '-Dmodule_root_dir=/home/vara/.npm/_cacache/tmp/git-clonejK1p2j/node_modules/iltorb',
npm ERR! npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! npm ERR! gyp info spawn args '--depth=.',
npm ERR! npm ERR! gyp info spawn args '--no-parallel',
npm ERR! npm ERR! gyp info spawn args '--generator-output',
npm ERR! npm ERR! gyp info spawn args 'build',
npm ERR! npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! npm ERR! gyp info spawn args ]
npm ERR! npm ERR! gyp info spawn make
npm ERR! npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! npm ERR! In file included from ../src/common/allocator.cc:1:
npm ERR! npm ERR! ../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
npm ERR! npm ERR! ../../nan/nan.h:2298:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
npm ERR! npm ERR! , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
npm ERR! npm ERR! ^
npm ERR! npm ERR! In file included from ../../nan/nan.h:2884,
npm ERR! npm ERR! from ../src/common/allocator.cc:1:
npm ERR! npm ERR! ../../nan/nan_typedarray_contents.h: In constructor ‘Nan::TypedArrayContents<T>::TypedArrayContents(v8::Local<v8::Value>)’:
npm ERR! npm ERR! ../../nan/nan_typedarray_contents.h:34:43: error: ‘class v8::ArrayBuffer’ has no member named ‘GetContents’; did you mean ‘IsContext’?
npm ERR! npm ERR! data = static_cast<char*>(buffer->GetContents().Data()) + byte_offset;
npm ERR! npm ERR! ^~~~~~~~~~~
npm ERR! npm ERR! IsContext
npm ERR! npm ERR! make: *** [iltorb.target.mk:149: Release/obj.target/iltorb/src/common/allocator.o] Error 1
npm ERR! npm ERR! gyp ERR! build error
npm ERR! npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! npm ERR! gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:526:28)
npm ERR! npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! npm ERR! gyp ERR! System Linux 3.10.0-1160.21.1.vz7.174.4
npm ERR! npm ERR! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! npm ERR! gyp ERR! cwd /home/vara/.npm/_cacache/tmp/git-clonejK1p2j/node_modules/iltorb
npm ERR! npm ERR! gyp ERR! node -v v17.5.0
npm ERR! npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! npm ERR! gyp ERR! not ok
npm ERR!
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR! /home/vara/.npm/_logs/2022-02-18T13_31_09_386Z-debug-0.log
npm ERR! A complete log of this run can be found in:
npm ERR! /home/vara/.npm/_logs/2022-02-18T13_30_52_454Z-debug-0.log
package.json
"name": "vara",
"version": "1.0.0",
"description": "",
"main": "bot.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"axios": "^0.24.0",
"canvas": "^2.8.0",
"colorthief": "^2.3.2",
"discord.js": "^13.5.1",
"dotenv": "^10.0.0",
"gifencoder": "^2.0.1",
"is-image-url": "^1.1.8",
"moment": "^2.29.1",
"moment-duration-format": "^2.3.2",
"mongoose": "^6.1.6",
"node-canvas-with-twemoji-and-discord-emoji": "^1.2.1",
"string-toolkit": "^1.5.0",
"table": "^6.7.5",
"topgg-autoposter": "^2.0.1",
"twemoji-parser": "^13.1.0"
}
}
Already tried:
Re-install nodejs & npm
Update nodejs & npm
Delete package-lock.json
Thank you very much for reading!
Maybe someone knows a way to fix this.

As you are using node version 17, I can see that this problem happens,
Downgrading to node version 16 will solve the problem(using nvm):
nvm install 16
nvm use 16
npm install

Related

Having troubles installing depencies with nodejs

Sup here, i'm actually trying to get a bot work on my vps so as everytime i create my directory etc
download the repo from github and follow the instructions
But i've got a problem, when i execute npm i in my terminal it return this:
PS C:\Users\vpsngamp\Desktop\crow> npm i
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: discord.js.old#11.6.5
npm ERR! Found: #discordjs/opus#0.7.0
npm ERR! node_modules/#discordjs/opus
npm ERR! #discordjs/opus#"^0.7.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional #discordjs/opus#"^0.1.0" from discord.js.old#11.6.5
npm ERR! node_modules/discord.js.old
npm ERR! discord.js.old#"^11.6.5" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: #discordjs/opus#0.1.0
npm ERR! node_modules/#discordjs/opus
npm ERR! peerOptional #discordjs/opus#"^0.1.0" from discord.js.old#11.6.5
npm ERR! node_modules/discord.js.old
npm ERR! discord.js.old#"^11.6.5" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\vpsngamp\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\vpsngamp\AppData\Local\npm-cache\_logs\2022-06-19T19_23_38_677Z-debug-0.log
PS C:\Users\vpsngamp\Desktop\crow>
So i've tried to do npm i --force or npm i --legacy-peer-deps, and ends up with this :
S C:\Users\vpsngamp\Desktop\crow> npm i --legacy-peer-deps
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated formidable#1.2.6: Please upgrade to latest, formidable#v2 or formidable#v3! Check these notes:
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated discord-buttons#4.0.0: New lib is coming! Join our support server for more help: https://discord.gg/KUS5pjyA4J
npm WARN deprecated snekfetch#3.6.4: use node-fetch instead
npm WARN deprecated superagent#6.1.0: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors
not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at <https://github.com/visionmedia/superagent/releases>. Thanks to #shadowgate15, #spence-s, and #niftylettuce. Superagent is sponsored by Forward Email at <https://forwardemail.net>.
npm WARN deprecated discord.js#12.5.3: no longer supported
npm WARN deprecated node-opus#0.3.3: This project is unmaintained. See #discordjs/opus for an alternative.
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup [
npm WARN cleanup 'C:\\Users\\vpsngamp\\Desktop\\crow\\node_modules\\puppeteer',
npm WARN cleanup [Error: EBUSY: resource busy or locked, rmdir 'C:\Users\vpsngamp\Desktop\crow\node_modules\puppeteer'] {
npm WARN cleanup errno: -4082,
npm WARN cleanup code: 'EBUSY',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\\Users\\vpsngamp\\Desktop\\crow\\node_modules\\puppeteer'
npm WARN cleanup }
npm WARN cleanup ],
npm WARN cleanup [
npm WARN cleanup 'C:\\Users\\vpsngamp\\Desktop\\crow\\node_modules\\canvas',
npm WARN cleanup [Error: EBUSY: resource busy or locked, rmdir 'C:\Users\vpsngamp\Desktop\crow\node_modules\canvas'] {
npm WARN cleanup errno: -4082,
npm WARN cleanup code: 'EBUSY',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\\Users\\vpsngamp\\Desktop\\crow\\node_modules\\canvas'
npm WARN cleanup }
npm WARN cleanup ],
npm WARN cleanup [
npm WARN cleanup 'C:\\Users\\vpsngamp\\Desktop\\crow\\node_modules',
npm WARN cleanup [Error: EBUSY: resource busy or locked, rmdir 'C:\Users\vpsngamp\Desktop\crow\node_modules\puppeteer'] {
npm WARN cleanup errno: -4082,
npm WARN cleanup code: 'EBUSY',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\\Users\\vpsngamp\\Desktop\\crow\\node_modules\\puppeteer'
npm WARN cleanup }
npm WARN cleanup ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path C:\Users\vpsngamp\Desktop\crow\node_modules\node-opus
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#9.0.0
npm ERR! gyp info using node#16.14.0 | win32 | x64
npm ERR! gyp info find Python using Python version 3.10.2 found at "C:\Python310\python.exe"
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS checking VS2019 (16.11.32126.315) found at:
npm ERR! gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
npm ERR! gyp ERR! find VS - found "Visual Studio C++ core features"
npm ERR! gyp ERR! find VS - missing any VC++ toolset
npm ERR! gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Users\vpsngamp\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:122:47)
npm ERR! gyp ERR! stack at C:\Users\vpsngamp\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:75:16
npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Users\vpsngamp\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:363:14)
npm ERR! gyp ERR! stack at C:\Users\vpsngamp\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:71:14
npm ERR! gyp ERR! stack at C:\Users\vpsngamp\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:384:16
npm ERR! gyp ERR! stack at C:\Users\vpsngamp\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack at C:\Users\vpsngamp\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:406:5)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:520:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1092:16)
npm ERR! gyp ERR! System Windows_NT 10.0.17763
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\vpsngamp\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\vpsngamp\Desktop\crow\node_modules\node-opus
npm ERR! gyp ERR! node -v v16.14.0
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\vpsngamp\AppData\Local\npm-cache\_logs\2022-06-19T19_25_05_586Z-debug-0.log
PS C:\Users\vpsngamp\Desktop\crow>
I've tried reading the logs but don't find anything useful, and the output from the second try is strange because i've got VSC and it is updated to the last version
My nodejs version is 16.14.0 and npm is 8.12.2
Thanks in advance

error running npm install on mac bigsur M1

When I run npm install on my project, I get
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: .....#10.1.3
npm ERR! Found: #angular/forms#11.2.14
npm ERR! node_modules/#angular/forms
npm ERR! #angular/forms#"^11.2.14" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #angular/forms#"^12.0.0" from ngx-typesafe-forms#1.5.1
npm ERR! node_modules/ngx-typesafe-forms
npm ERR! ngx-typesafe-forms#"^1.4.3" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/..../.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/.../.npm/_logs/2021-09-02T10_06_13_858Z-debug.log
then I tried I have tried running npm install --legacy-peer-deps and got
npm ERR! 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 (/Users/......./node_modules/node-gyp/lib/build.js:262:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:394: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 "/opt/homebrew/Cellar/node/16.4.2/bin/node" "/Users/...../node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd /Users/......../node_modules/node-sass
npm ERR! gyp ERR! node -v v16.4.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
i have tried deleting my node_modules folder and running it again.
npm -v = 7.21.1
I got same issue, my angular project version was 9 and the node version was 16 and npm version was 8.
just downgrade your node version and then run npm install it worked for me.
use the same node version that the package-lock.json file was created for the first time.
hope this is helpful

How to fix the problem when installing #vue/cli-plugin-unit-jest?

First i installed npm and vue from the official site and npm worked well when installing other packages like cli-service and cli-eslint. but cli-plugin-unit-jest just failed.
i use the following command:
npm install -g #vue/cli-plugin-unit-jest#^4.4.6
but got the following error:
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup [
npm WARN cleanup undefined,
npm WARN cleanup AssertionError [ERR_ASSERTION]: rimraf: missing path
npm WARN cleanup at rimraf (D:\Software\NodeJs\node_global\node_modules\npm\node_modules\rimraf\rimraf.js:54:3)
...
npm WARN cleanup generatedMessage: false,
npm WARN cleanup code: 'ERR_ASSERTION',
npm WARN cleanup actual: undefined,
npm WARN cleanup expected: true,
npm WARN cleanup operator: '=='
npm WARN cleanup }
npm WARN cleanup ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path D:\Software\NodeJs\node_global\node_modules\#vue\cli-plugin-unit-jest\node_modules\canvas
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! �ڴ˽��������һ������һ����Ŀ����Ҫ���ò������ɣ������ӡ�-m�����ء�
npm ERR! Backend.cc
npm ERR! D:\Software\NodeJs\node_global\node_modules\#vue\cli-plugin-unit-jest\node_modules\canvas\src\backend\Backend.h(3,10): fatal error C1083: �޷��򿪰����ļ�: ��cairo.h��: No such file or directory [D:\Software\NodeJs\ node_global\node_modules\#vue\cli-plugin-unit-jest\node_modules\canvas\build\canvas.vcxproj]
npm ERR! gyp info it worked if it ends with ok
...
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `D:\Software\MSVS2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onExit (D:\Software\NodeJs\node_global\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:378:20)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Windows_NT 10.0.19042
npm ERR! gyp ERR! command "D:\\Software\\NodeJs\\node.exe" "D:\\Software\\NodeJs\\node_global\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd D:\Software\NodeJs\node_global\node_modules\#vue\cli-plugin-unit-jest\node_modules\canvas
npm ERR! gyp ERR! node -v v15.11.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok
what is the problem? Are there any dependencies i haven't installed?

Meteor fails. error: couldn't install npm packages from npm-shrinkwrap

I'm new to meteor and both me and my mentor are stumped.
OS: Ubuntu 16.04
Meteor --version: 1.2.1
node -v: v7.5.0
meteor node -v: v0.10.40
npm -v: 4.1.2
meteor npm -v: 1.4.28
I tried following the advice on this and this stackoverflow links, but got the same error. No results with another github link either(sorry, need more reputation to post more links).
Please feel free to ask for any additional info for diagnosis.
=> Started proxy.
=> Meteor 1.4.3.2 is available. Update this project with 'meteor update'.
npm-container: updating npm dependencies -- fibers, path, soap, xml2json, fast-csv, unoconv, aws-sdk, > source-map-support, gm, request, mime,
analytics-node, oauth, number-to-words, omit-empty, superagent...
=> Errors prevented startup:
While building package npm-container:
error: couldn't install npm packages from npm-shrinkwrap: Command failed: npm WARN package.json > packages-for-meteor-npm-container#0.0.0 No
description
npm WARN package.json packages-for-meteor-npm-container#0.0.0 No repository field.
npm WARN package.json packages-for-meteor-npm-container#0.0.0 No README data
npm WARN engine analytics-node#2.0.1: wanted: {"node":">= 0.12.x"} (current: > {"node":"0.10.40","npm":"1.4.28"})
npm WARN deprecated node-uuid#1.4.7: Use uuid module instead
npm WARN deprecated tough-cookie#2.2.1: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/> advisories/130
npm WARN engine is-buffer#1.1.3: wanted: {"node":">=0.12"} (current: {"node":"0.10.40","npm":"1.4.28"})
gyp ERR! configure error
gyp ERR! stack Error: Python executable "python" is v3.6.0, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack at failPythonVersion
(/home/shrey/.meteor/packages/meteor-tool/.1.1.10.ki0ccv++os.linux.x86_64+web.browser+web.cordova/> mt-os.linux.x86_64/dev_bundle/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:108:14)
gyp ERR! stack at
/home/shrey/.meteor/packages/meteor-tool/.1.1.10.ki0ccv++os.linux.x86_64+web.browser+web.cordova/> mt-os.linux.x86_64/dev_bundle/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:97:9
gyp ERR! stack at ChildProcess.exithandler (child_process.js:656:7)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at maybeClose (child_process.js:766:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:833:5)
gyp ERR! System Linux 4.4.0-72-generic
gyp ERR! command "node"
"/home/shrey/.meteor/packages/meteor-tool/.1.1.10.ki0ccv++os.linux.x86_64+web.browser+web.cordova/> mt-os.linux.x86_64/dev_bundle/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js"
"rebuild"
gyp ERR! cwd
/home/shrey/projects/steplr-projects/employerapp/packages/npm-container/.npm/package-new-tca2qx/node_modules/> xml2json/node_modules/node-expat
gyp ERR! node -v v0.10.40
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm WARN deprecated minimatch#3.0.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm ERR! node-expat#2.3.13 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-expat#2.3.13 install script.
npm ERR! This is most likely a problem with the node-expat 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 node-expat
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 4.4.0-72-generic
npm ERR! command
"/home/shrey/.meteor/packages/meteor-tool/.1.1.10.ki0ccv++os.linux.x86_64+web.browser+web.cordova/> mt-os.linux.x86_64/dev_bundle/bin/node"
"/home/shrey/.meteor/packages/meteor-tool/.1.1.10.ki0ccv++os.linux.x86_64+web.browser+web.cordova/> mt-os.linux.x86_64/dev_bundle/bin/npm"
"install"
npm ERR! cwd /home/shrey/projects/steplr-projects/employerapp/packages/npm-container/.npm/package-new-tca2qx
npm ERR! node -v v0.10.40
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0
npm WARN package.json packages-for-meteor-npm-container#0.0.0 No description
npm WARN package.json packages-for-meteor-npm-container#0.0.0 No repository field.
npm WARN package.json packages-for-meteor-npm-container#0.0.0 No README data
npm WARN engine analytics-node#2.0.1: wanted: {"node":">= 0.12.x"} (current: > {"node":"0.10.40","npm":"1.4.28"})
npm WARN deprecated node-uuid#1.4.7: Use uuid module instead
npm WARN deprecated tough-cookie#2.2.1: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/> advisories/130
npm WARN engine is-buffer#1.1.3: wanted: {"node":">=0.12"} (current: {"node":"0.10.40","npm":"1.4.28"})
gyp ERR! configure error
gyp ERR! stack Error: Python executable "python" is v3.6.0, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack at failPythonVersion
(/home/shrey/.meteor/packages/meteor-tool/.1.1.10.ki0ccv++os.linux.x86_64+web.browser+web.cordova/> mt-os.linux.x86_64/dev_bundle/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:108:14)
gyp ERR! stack at
/home/shrey/.meteor/packages/meteor-tool/.1.1.10.ki0ccv++os.linux.x86_64+web.browser+web.cordova/> mt-os.linux.x86_64/dev_bundle/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:97:9
gyp ERR! stack at ChildProcess.exithandler (child_process.js:656:7)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at maybeClose (child_process.js:766:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:833:5)
gyp ERR! System Linux 4.4.0-72-generic
gyp ERR! command "node"
"/home/shrey/.meteor/packages/meteor-tool/.1.1.10.ki0ccv++os.linux.x86_64+web.browser+web.cordova/> mt-os.linux.x86_64/dev_bundle/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js"
"rebuild"
gyp ERR! cwd
/home/shrey/projects/steplr-projects/employerapp/packages/npm-container/.npm/package-new-tca2qx/node_modules/> xml2json/node_modules/node-expat
gyp ERR! node -v v0.10.40
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm WARN deprecated minimatch#3.0.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm ERR! node-expat#2.3.13 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-expat#2.3.13 install script.
npm ERR! This is most likely a problem with the node-expat 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 node-expat
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 4.4.0-72-generic
npm ERR! command
"/home/shrey/.meteor/packages/meteor-tool/.1.1.10.ki0ccv++os.linux.x86_64+web.browser+web.cordova/> mt-os.linux.x86_64/dev_bundle/bin/node"
"/home/shrey/.meteor/packages/meteor-tool/.1.1.10.ki0ccv++os.linux.x86_64+web.browser+web.cordova/> mt-os.linux.x86_64/dev_bundle/bin/npm"
"install"
npm ERR! cwd /home/shrey/projects/steplr-projects/employerapp/packages/npm-container/.npm/package-new-tca2qx
npm ERR! node -v v0.10.40
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0
=> Your application has errors. Waiting for file change.
Thank you.

Build failing on sqlserver driver for nodejs

I'm trying to install node-sqlserver for my application in the node_modules directory by typing the following command,
npm install node-sqlserver
This is what I get,
npm WARN package.json application-name#0.0.1 No README.md file found!
npm WARN package.json node#0.0.0 No README.md file found!
npm http GET https://registry.npmjs.org/node-sqlserver
npm http 304 https://registry.npmjs.org/node-sqlserver
npm WARN deprecated node-sqlserver#0.1.0: This package has been superseded by msnodesql.
> node-sqlserver#0.1.0 install C:\Users\Tarun\Desktop\Songify\node_modules\node-sqlserver
> node-gyp rebuild
C:\Users\Tarun\Desktop\Songify\node_modules\node-sqlserver>node "C:\Program Files (x86)\nodejs\node_modules\npm\bin\node
-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
gyp ERR! rebuild error Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! rebuild error at failNoPython (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\con
figure.js:85:14)
gyp ERR! rebuild error at Object.oncomplete (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\li
b\configure.js:59:11)
gyp ERR! not ok
npm ERR! node-sqlserver#0.1.0 install: `node-gyp rebuild`
npm ERR! `cmd "/c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the node-sqlserver#0.1.0 install script.
npm ERR! This is most likely a problem with the node-sqlserver 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 node-sqlserver
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\
\npm-cli.js" "install" "node-sqlserver"
npm ERR! cwd C:\Users\Tarun\Desktop\Songify\node_modules
npm ERR! node -v v0.6.20
npm ERR! npm -v 1.1.37
npm ERR! code ELIFECYCLE
npm ERR! message node-sqlserver#0.1.0 install: `node-gyp rebuild`
npm ERR! message `cmd "/c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\Tarun\Desktop\Songify\node_modules\npm-debug.log
npm ERR! not ok code undefined
npm ERR! not ok code 1
How do I resolve this issue? I'm using express as well
Your answer is in the output, you need to install python, following that you will get another error, you will need to install Microsoft SDK for Windows Server 2008 and dot net framework 3.5

Resources