title: npm error when trying to install packages from package.json
body: <p>so i was trying to install my npm packages from my project (package.json).<br>
  (<em>The package got pulled from my github repo via git pull</em>)<br>
  But when i tried to run <code>npm i</code> i get the error below:</p>
  <p><strong>Info:</strong></p>
  <ul>
  <li>Linux Debian 10</li>
  <li>Node v17.5.0</li>
  <li>npm 8.4.1</li>
  </ul>
  <p><strong>Full Error:</strong></p>
  <pre><code>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 &gt;=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 &gt;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 &gt;=3.2.0 &lt;3.2.7 || &gt;=4 &lt;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@&lt;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 &quot;/usr/bin/python3&quot;
  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/&lt;(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&lt;uv_after_work_cb&gt;(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&lt;T&gt;::TypedArrayContents(v8::Local&lt;v8::Value&gt;)’:
  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&lt;char*&gt;(buffer-&gt;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 &quot;/usr/bin/node&quot; &quot;/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js&quot; &quot;rebuild&quot;
  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
  </code></pre>
  <p><strong>package.json</strong></p>
  <pre><code>  &quot;name&quot;: &quot;vara&quot;,
    &quot;version&quot;: &quot;1.0.0&quot;,
    &quot;description&quot;: &quot;&quot;,
    &quot;main&quot;: &quot;bot.js&quot;,
    &quot;scripts&quot;: {
      &quot;test&quot;: &quot;echo \&quot;Error: no test specified\&quot; &amp;&amp; exit 1&quot;
    },
    &quot;author&quot;: &quot;&quot;,
    &quot;license&quot;: &quot;ISC&quot;,
    &quot;dependencies&quot;: {
      &quot;axios&quot;: &quot;^0.24.0&quot;,
      &quot;canvas&quot;: &quot;^2.8.0&quot;,
      &quot;colorthief&quot;: &quot;^2.3.2&quot;,
      &quot;discord.js&quot;: &quot;^13.5.1&quot;,
      &quot;dotenv&quot;: &quot;^10.0.0&quot;,
      &quot;gifencoder&quot;: &quot;^2.0.1&quot;,
      &quot;is-image-url&quot;: &quot;^1.1.8&quot;,
      &quot;moment&quot;: &quot;^2.29.1&quot;,
      &quot;moment-duration-format&quot;: &quot;^2.3.2&quot;,
      &quot;mongoose&quot;: &quot;^6.1.6&quot;,
      &quot;node-canvas-with-twemoji-and-discord-emoji&quot;: &quot;^1.2.1&quot;,
      &quot;string-toolkit&quot;: &quot;^1.5.0&quot;,
      &quot;table&quot;: &quot;^6.7.5&quot;,
      &quot;topgg-autoposter&quot;: &quot;^2.0.1&quot;,
      &quot;twemoji-parser&quot;: &quot;^13.1.0&quot;
    }
  }
  </code></pre>
  <p><strong>Already tried:</strong></p>
  <ul>
  <li>Re-install nodejs &amp; npm</li>
  <li>Update nodejs &amp; npm</li>
  <li>Delete package-lock.json</li>
  </ul>
  <p><strong>Thank you very much for reading!<br>
  Maybe someone knows a way to fix this.</strong></p>