Reputation: 87
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:
Full Error:
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: 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 [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: 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 [email protected]: Please update to ini >=1.3.6 to avoid a prototype pollution issue
npm ERR! npm WARN deprecated [email protected]: This is not needed anymore. Use `require('os').homedir()` instead.
npm ERR! npm WARN deprecated [email protected]: flatten is deprecated in favor of utility frameworks such as lodash.
npm ERR! npm WARN deprecated [email protected]: This module has been deprecated and is no longer maintained. Please use @rollup/plugin-buble.
npm ERR! npm WARN deprecated [email protected]: 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 [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm ERR! npm WARN deprecated [email protected]: This module has been deprecated and is no longer maintained. Please use @rollup/plugin-json.
npm ERR! npm WARN deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-node-resolve.
npm ERR! npm WARN deprecated [email protected]: 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 [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-babel.
npm ERR! npm WARN deprecated [email protected]: 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 [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-commonjs.
npm ERR! npm WARN deprecated @babel/[email protected]: 🚨 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 [email protected]: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm ERR! npm WARN deprecated [email protected]: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm ERR! npm WARN deprecated [email protected]: 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 [email protected]: 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 [email protected]
npm ERR! npm ERR! gyp info using [email protected] | 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:
Thank you very much for reading!
Maybe someone knows a way to fix this.
Upvotes: 0
Views: 15664
Reputation: 580
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
Upvotes: 3