So i made a mistake on my code.
then I downloaded my code from stable version I had on git.
now I cant run it.
i tried to install the packages using npm install but I am getting this error
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: mean-course#0.0.0
npm ERR! Found: zone.js#0.8.29
npm ERR! node_modules/zone.js
npm ERR! zone.js#"^0.8.26" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer zone.js#"~0.9.1" from #angular/core#8.2.14
npm ERR! node_modules/#angular/core
npm ERR! #angular/core#"^8.0.0" from the root project
npm ERR! peer #angular/core#">=2.3.1 <10.0.0 || >9.0.0-beta <10.0.0 || >9.1.0-beta <10.0.0 || >9.2.0-beta <10.0.0" from codelyzer#5.2.2
npm ERR! node_modules/codelyzer
npm ERR! dev codelyzer#"^5.0.1" 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/juan/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/juan/.npm/_logs/2022-12-17T19_54_52_433Z-debug-0.log
I tried to run the code using npm install --legacy-peer-deps and I get the following error:
(base) juan#juans-Air-2 final % npm install --legacy-peer-deps
npm WARN deprecated bcrypt#2.0.1: versions < v5.0.0 do not handle NUL in passwords properly
npm WARN deprecated date-format#2.1.0: 2.x is no longer supported. Please upgrade to 4.x or higher.
npm WARN deprecated log4js#4.5.1: 4.x is no longer supported. Please upgrade to 6.x or higher.
npm WARN deprecated streamroller#1.0.6: 1.x is no longer supported. Please upgrade to 3.x or higher.
npm WARN deprecated protractor#5.4.4: We have news to share - Protractor is deprecated and will reach end-of-life by Summer 2023. To learn more and find out about other options please refer to this post on the Angular blog. Thank you for using and contributing to Protractor. https://goo.gle/state-of-e2e-in-angular
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
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 source-map-url#0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated source-map-resolve#0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated sourcemap-codec#1.4.8: Please use #jridgewell/sourcemap-codec instead
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated readdir-scoped-modules#1.1.0: This functionality has been moved to #npmcli/fs
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated read-package-tree#5.3.1: The functionality that this package provided is now in #npmcli/arborist
npm WARN deprecated querystring#0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated node-fetch-npm#2.0.4: This module is not used anymore, npm uses minipass-fetch for its fetch implementation now
npm WARN deprecated multer#1.4.4: Multer 1.x is affected by CVE-2022-24434. This is fixed in v1.4.4-lts.1 which drops support for versions of Node.js before 6. Please upgrade to at least Node.js 6 and version 1.4.4-lts.1 of Multer. If you need support for older versions of Node.js, we are open to accepting patches that would fix the CVE on the main 1.x release line, whilst maintaining compatibility with Node.js 0.10.
npm WARN deprecated json3#3.3.2: Please use the native JSON object instead of JSON 3
npm WARN deprecated ini#1.3.5: Please update to ini >=1.3.6 to avoid a prototype pollution issue
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated chokidar#2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated acorn-dynamic-import#4.0.0: This is probably built in to whatever tool you're using. If you still need it... idk
npm WARN deprecated #schematics/update#0.803.29: This was an internal-only Angular package up through Angular v11 which is no longer used or maintained. Upgrade Angular to v12+ to remove this dependency.
npm WARN deprecated core-js#2.6.12: core-js#<3.23.3 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. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated core-js#2.6.12: core-js#<3.23.3 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. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated core-js#3.0.1: core-js#<3.23.3 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. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! code 1
npm ERR! path /Users/juan/Desktop/final/node_modules/bcrypt
npm ERR! command failed
npm ERR! command sh /var/folders/lh/nl1xy3g132748mjl5h0j3gsc0000gn/T/install-3acd8054.sh
npm ERR! CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
npm ERR! CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
npm ERR! CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
npm ERR! Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/juan/Desktop/final/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/Users/juan/Desktop/final/node_modules/bcrypt/lib/binding --napi_version=8 --node_abi_napi=napi' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp#0.9.1
npm ERR! node-pre-gyp info using node#16.17.0 | darwin | arm64
npm ERR! node-pre-gyp info check checked for "/Users/juan/Desktop/final/node_modules/bcrypt/lib/binding/bcrypt_lib.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/kelektiv/node.bcrypt.js/releases/download/v2.0.1/bcrypt_lib-v2.0.1-node-v93-darwin-arm64-unknown.tar.gz
npm ERR! node-pre-gyp http 404 https://github.com/kelektiv/node.bcrypt.js/releases/download/v2.0.1/bcrypt_lib-v2.0.1-node-v93-darwin-arm64-unknown.tar.gz
npm ERR! node-pre-gyp ERR! Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v2.0.1/bcrypt_lib-v2.0.1-node-v93-darwin-arm64-unknown.tar.gz
npm ERR! node-pre-gyp ERR! Pre-built binaries not found for bcrypt#2.0.1 and node#16.17.0 (node-v93 ABI, unknown) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp http 404 status code downloading tarball https://github.com/kelektiv/node.bcrypt.js/releases/download/v2.0.1/bcrypt_lib-v2.0.1-node-v93-darwin-arm64-unknown.tar.gz
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.17.0 | darwin | arm64
npm ERR! gyp info ok
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.17.0 | darwin | arm64
npm ERR! gyp info find Python using Python version 3.11.1 found at "/Library/Frameworks/Python.framework/Versions/3.11/bin/python3"
npm ERR! gyp info spawn /Library/Frameworks/Python.framework/Versions/3.11/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/juan/Desktop/final/node_modules/bcrypt/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/juan/Library/Caches/node-gyp/16.17.0/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/Users/juan/Library/Caches/node-gyp/16.17.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/juan/Library/Caches/node-gyp/16.17.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/juan/Desktop/final/node_modules/bcrypt',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info ok
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.17.0 | darwin | arm64
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! In file included from ../src/bcrypt_node.cc:1:
npm ERR! In file included from ../node_modules/nan/nan.h:202:
npm ERR! In file included from ../node_modules/nan/nan_converters.h:67:
npm ERR! ../node_modules/nan/nan_converters_43_inl.h:22:1: error: no viable conversion from 'Local<v8::Context>' to 'v8::Isolate *'
npm ERR! X(Boolean)
npm ERR! ^~~~~~~~~~
npm ERR! ../node_modules/nan/nan_converters_43_inl.h:18:23: note: expanded from macro 'X'
npm ERR! val->To ## TYPE(isolate->GetCurrentContext()) \
npm ERR! ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! /Users/juan/Library/Caches/node-gyp/16.17.0/include/node/v8.h:3086:37: note: passing argument to parameter 'isolate' here
npm ERR! Local<Boolean> ToBoolean(Isolate* isolate) const;
npm ERR! ^
npm ERR! In file included from ../src/bcrypt_node.cc:1:
npm ERR! In file included from ../node_modules/nan/nan.h:202:
npm ERR! In file included from ../node_modules/nan/nan_converters.h:67:
npm ERR! ../node_modules/nan/nan_converters_43_inl.h:22:1: error: no member named 'FromMaybe' in 'v8::Local<v8::Boolean>'
npm ERR! X(Boolean)
npm ERR! ^~~~~~~~~~
npm ERR! ../node_modules/nan/nan_converters_43_inl.h:19:12: note: expanded from macro 'X'
npm ERR! .FromMaybe(v8::Local<v8::TYPE>())); \
npm ERR! ^
npm ERR! ../node_modules/nan/nan_converters_43_inl.h:40:1: error: no viable conversion from 'Local<v8::Context>' to 'v8::Isolate *'
npm ERR! X(bool, Boolean)
npm ERR! ^~~~~~~~~~~~~~~~
npm ERR! ../node_modules/nan/nan_converters_43_inl.h:37:29: note: expanded from macro 'X'
npm ERR! return val->NAME ## Value(isolate->GetCurrentContext()); \
npm ERR! ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! /Users/juan/Library/Caches/node-gyp/16.17.0/include/node/v8.h:3096:30: note: passing argument to parameter 'isolate' here
npm ERR! bool BooleanValue(Isolate* isolate) const;
npm ERR! ^
npm ERR! In file included from ../src/bcrypt_node.cc:1:
npm ERR! In file included from ../node_modules/nan/nan.h:202:
npm ERR! In file included from ../node_modules/nan/nan_converters.h:67:
npm ERR! ../node_modules/nan/nan_converters_43_inl.h:40:1: error: no viable conversion from returned value of type 'bool' to function return type 'imp::ToFactory<bool>::return_t' (aka 'Maybe<bool>')
npm ERR! X(bool, Boolean)
npm ERR! ^~~~~~~~~~~~~~~~
npm ERR! ../node_modules/nan/nan_converters_43_inl.h:37:10: note: expanded from macro 'X'
npm ERR! return val->NAME ## Value(isolate->GetCurrentContext()); \
npm ERR! ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! /Users/juan/Library/Caches/node-gyp/16.17.0/include/node/v8.h:10437:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'bool' to 'const v8::Maybe<bool> &' for 1st argument
npm ERR! class Maybe {
npm ERR! ^
npm ERR! /Users/juan/Library/Caches/node-gyp/16.17.0/include/node/v8.h:10437:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'bool' to 'v8::Maybe<bool> &&' for 1st argument
npm ERR! /Users/juan/Library/Caches/node-gyp/16.17.0/include/node/v8.h:10492:12: note: explicit constructor is not a candidate
npm ERR! explicit Maybe(const T& t) : has_value_(true), value_(t) {}
npm ERR! ^
npm ERR! In file included from ../src/bcrypt_node.cc:1:
npm ERR! In file included from ../node_modules/nan/nan.h:203:
npm ERR! In file included from ../node_modules/nan/nan_new.h:189:
npm ERR! ../node_modules/nan/nan_implementation_12_inl.h:103:42: error: no viable conversion from 'v8::Isolate *' to 'Local<v8::Context>'
npm ERR! return scope.Escape(v8::Function::New( isolate
npm ERR! ^~~~~~~
npm ERR! /Users/juan/Library/Caches/node-gyp/16.17.0/include/node/v8.h:200:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'v8::Isolate *' to 'const v8::Local<v8::Context> &' for 1st argument
npm ERR! class Local {
npm ERR! ^
npm ERR! /Users/juan/Library/Caches/node-gyp/16.17.0/include/node/v8.h:200:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'v8::Isolate *' to 'v8::Local<v8::Context> &&' for 1st argument
npm ERR! /Users/juan/Library/Caches/node-gyp/16.17.0/include/node/v8.h:204:13: note: candidate template ignored: could not match 'Local<type-parameter-0-0>' against 'v8::Isolate *'
npm ERR! V8_INLINE Local(Local<S> that)
npm ERR! ^
npm ERR! /Users/juan/Library/Caches/node-gyp/16.17.0/include/node/v8.h:348:22: note: explicit constructor is not a candidate
npm ERR! explicit V8_INLINE Local(T* that) : val_(that) {}
npm ERR! ^
npm ERR! /Users/juan/Library/Caches/node-gyp/16.17.0/include/node/v8.h:4754:22: note: passing argument to parameter 'context' here
npm ERR! Local<Context> context, FunctionCallback callback,
npm ERR! ^
npm ERR! In file included from ../src/bcrypt_node.cc:1:
npm ERR! In file included from ../node_modules/nan/nan.h:203:
npm ERR! In file included from ../node_modules/nan/nan_new.h:189:
npm ERR! ../node_modules/nan/nan_implementation_12_inl.h:337:37: error: too few arguments to function call, expected 2, have 1
npm ERR! return v8::StringObject::New(value).As<v8::StringObject>();
npm ERR! ~~~~~~~~~~~~~~~~~~~~~ ^
npm ERR! /Users/juan/Library/Caches/node-gyp/16.17.0/include/node/v8.h:6196:23: note: 'New' declared here
npm ERR! static Local<Value> New(Isolate* isolate, Local<String> value);
npm ERR! ^
npm ERR! In file included from ../src/bcrypt_node.cc:1:
npm ERR! ../node_modules/nan/nan.h:1034:53: error: too few arguments to function call, single argument 'context' was not specified
npm ERR! v8::Local<v8::String> string = from->ToString();
npm ERR! ~~~~~~~~~~~~~~ ^
npm ERR! /Users/juan/Library/Caches/node-gyp/16.17.0/include/node/v8.h:3048:44: note: 'ToString' declared here
npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
npm ERR! ^
npm ERR! In file included from ../src/bcrypt_node.cc:1:
npm ERR! ../node_modules/nan/nan.h:1034:29: error: no viable conversion from 'MaybeLocal<v8::String>' to 'v8::Local<v8::String>'
npm ERR! v8::Local<v8::String> string = from->ToString();
npm ERR! ^ ~~~~~~~~~~~~~~~~
npm ERR! /Users/juan/Library/Caches/node-gyp/16.17.0/include/node/v8.h:200:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'MaybeLocal<v8::String>' to 'const v8::Local<v8::String> &' for 1st argument
npm ERR! class Local {
npm ERR! ^
npm ERR! /Users/juan/Library/Caches/node-gyp/16.17.0/include/node/v8.h:200:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'MaybeLocal<v8::String>' to 'v8::Local<v8::String> &&' for 1st argument
npm ERR! /Users/juan/Library/Caches/node-gyp/16.17.0/include/node/v8.h:204:13: note: candidate template ignored: could not match 'Local' against 'MaybeLocal'
npm ERR! V8_INLINE Local(Local<S> that)
npm ERR! ^
npm ERR! /Users/juan/Library/Caches/node-gyp/16.17.0/include/node/v8.h:348:22: note: explicit constructor is not a candidate
npm ERR! explicit V8_INLINE Local(T* that) : val_(that) {}
npm ERR! ^
npm ERR! In file included from ../src/bcrypt_node.cc:1:
npm ERR! ../node_modules/nan/nan.h:1044:37: error: cannot initialize a parameter of type 'v8::Isolate *' with an lvalue of type 'char *'
npm ERR! length_ = string->WriteUtf8(str_, static_cast<int>(len), 0, flags);
npm ERR! ^~~~
npm ERR! /Users/juan/Library/Caches/node-gyp/16.17.0/include/node/v8.h:3277:26: note: passing argument to parameter 'isolate' here
npm ERR! int WriteUtf8(Isolate* isolate, char* buffer, int length = -1,
npm ERR! ^
npm ERR! In file included from ../src/bcrypt_node.cc:1:
npm ERR! ../node_modules/nan/nan.h:1818:28: error: no matching member function for call to 'Set'
npm ERR! New(persistentHandle)->Set(New(key).ToLocalChecked(), value);
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~^~~
npm ERR! /Users/juan/Library/Caches/node-gyp/16.17.0/include/node/v8.h:3961:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR! V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR! ^
npm ERR! /Users/juan/Library/Caches/node-gyp/16.17.0/include/node/v8.h:3964:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR! V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR! ^
npm ERR! In file included from ../src/bcrypt_node.cc:1:
npm ERR! ../node_modules/nan/nan.h:1824:28: error: no matching member function for call to 'Set'
npm ERR! New(persistentHandle)->Set(key, value);
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~^~~
npm ERR! /Users/juan/Library/Caches/node-gyp/16.17.0/include/node/v8.h:3961:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR! V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR! ^
npm ERR! /Users/juan/Library/Caches/node-gyp/16.17.0/include/node/v8.h:3964:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR! V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR! ^
npm ERR! In file included from ../src/bcrypt_node.cc:1:
npm ERR! ../node_modules/nan/nan.h:1830:28: error: no matching member function for call to 'Set'
npm ERR! New(persistentHandle)->Set(index, value);
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~^~~
npm ERR! /Users/juan/Library/Caches/node-gyp/16.17.0/include/node/v8.h:3961:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR! V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR! ^
npm ERR! /Users/juan/Library/Caches/node-gyp/16.17.0/include/node/v8.h:3964:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR! V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR! ^
npm ERR! In file included from ../src/bcrypt_node.cc:1:
npm ERR! ../node_modules/nan/nan.h:1836:32: error: no matching member function for call to 'Get'
npm ERR! New(persistentHandle)->Get(New(key).ToLocalChecked()));
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~^~~
npm ERR! /Users/juan/Library/Caches/node-gyp/16.17.0/include/node/v8.h:4007:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
npm ERR! ^
npm ERR! /Users/juan/Library/Caches/node-gyp/16.17.0/include/node/v8.h:4010:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
npm ERR! ^
npm ERR! In file included from ../src/bcrypt_node.cc:1:
npm ERR! ../node_modules/nan/nan.h:1842:48: error: no matching member function for call to 'Get'
npm ERR! return scope.Escape(New(persistentHandle)->Get(key));
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~^~~
npm ERR! /Users/juan/Library/Caches/node-gyp/16.17.0/include/node/v8.h:4007:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
npm ERR! ^
npm ERR! /Users/juan/Library/Caches/node-gyp/16.17.0/include/node/v8.h:4010:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
npm ERR! ^
npm ERR! In file included from ../src/bcrypt_node.cc:1:
npm ERR! ../node_modules/nan/nan.h:1847:48: error: no matching member function for call to 'Get'
npm ERR! return scope.Escape(New(persistentHandle)->Get(index));
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~^~~
npm ERR! /Users/juan/Library/Caches/node-gyp/16.17.0/include/node/v8.h:4007:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
npm ERR! ^
npm ERR! /Users/juan/Library/Caches/node-gyp/16.17.0/include/node/v8.h:4010:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
npm ERR! ^
npm ERR! In file included from ../src/bcrypt_node.cc:1:
npm ERR! In file included from ../node_modules/nan/nan.h:2657:
npm ERR! ../node_modules/nan/nan_object_wrap.h:24:25: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object>'
npm ERR! assert(persistent().IsNearDeath());
npm ERR! ~~~~~~~~~~~~ ^
npm ERR! /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/assert.h:99:25: note: expanded from macro 'assert'
npm ERR! (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __ASSERT_FILE_NAME, __LINE__, #e) : (void)0)
npm ERR! ^
npm ERR! In file included from ../src/bcrypt_node.cc:1:
npm ERR! In file included from ../node_modules/nan/nan.h:2657:
npm ERR! ../node_modules/nan/nan_object_wrap.h:67:18: error: no member named 'MarkIndependent' in 'Nan::Persistent<v8::Object>'
npm ERR! persistent().MarkIndependent();
npm ERR! ~~~~~~~~~~~~ ^
npm ERR! ../node_modules/nan/nan_object_wrap.h:124:26: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object>'
npm ERR! assert(wrap->handle_.IsNearDeath());
npm ERR! ~~~~~~~~~~~~~ ^
npm ERR! /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/assert.h:99:25: note: expanded from macro 'assert'
npm ERR! (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __ASSERT_FILE_NAME, __LINE__, #e) : (void)0)
npm ERR! ^
npm ERR! In file included from ../src/bcrypt_node.cc:1:
npm ERR! In file included from ../node_modules/nan/nan.h:2753:
npm ERR! ../node_modules/nan/nan_typedarray_contents.h:34:43: warning: 'GetContents' is deprecated: Use GetBackingStore. See http://crbug.com/v8/9908. [-Wdeprecated-declarations]
npm ERR! data = static_cast<char*>(buffer->GetContents().Data()) + byte_offset;
npm ERR! ^
npm ERR! /Users/juan/Library/Caches/node-gyp/16.17.0/include/node/v8.h:5614:3: note: 'GetContents' has been explicitly marked deprecated here
npm ERR! V8_DEPRECATED("Use GetBackingStore. See http://crbug.com/v8/9908.")
npm ERR! ^
npm ERR! /Users/juan/Library/Caches/node-gyp/16.17.0/include/node/v8config.h:454:35: note: expanded from macro 'V8_DEPRECATED'
npm ERR! # define V8_DEPRECATED(message) [[deprecated(message)]]
npm ERR! ^
npm ERR! ../src/bcrypt_node.cc:66:21: error: no matching constructor for initialization of 'String::Utf8Value'
npm ERR! String::Utf8Value value(str);
npm ERR! ^ ~~~
npm ERR! /Users/juan/Library/Caches/node-gyp/16.17.0/include/node/v8.h:3588:5: note: candidate constructor not viable: no known conversion from 'Local<v8::String>' to 'const v8::String::Utf8Value' for 1st argument
npm ERR! Utf8Value(const Utf8Value&) = delete;
npm ERR! ^
npm ERR! /Users/juan/Library/Caches/node-gyp/16.17.0/include/node/v8.h:3581:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
npm ERR! Utf8Value(Isolate* isolate, Local<v8::Value> obj);
npm ERR! ^
npm ERR! fatal error: too many errors emitted, stopping now [-ferror-limit=]
npm ERR! 1 warning and 20 errors generated.
npm ERR! make: *** [Release/obj.target/bcrypt_lib/src/bcrypt_node.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 (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Darwin 21.6.0
npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/juan/Desktop/final/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/Users/juan/Desktop/final/node_modules/bcrypt/lib/binding" "--napi_version=8" "--node_abi_napi=napi"
npm ERR! gyp ERR! cwd /Users/juan/Desktop/final/node_modules/bcrypt
npm ERR! gyp ERR! node -v v16.17.0
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/juan/Desktop/final/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/Users/juan/Desktop/final/node_modules/bcrypt/lib/binding --napi_version=8 --node_abi_napi=napi' (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/juan/Desktop/final/node_modules/bcrypt/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:513:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1093:16)
npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! node-pre-gyp ERR! System Darwin 21.6.0
npm ERR! node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/juan/Desktop/final/node_modules/bcrypt/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /Users/juan/Desktop/final/node_modules/bcrypt
npm ERR! node-pre-gyp ERR! node -v v16.17.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.9.1
npm ERR! node-pre-gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/juan/.npm/_logs/2022-12-17T19_57_40_323Z-debug-0.log
I have no clue what is going on here :(
the code was working 2 days ago. now its not working at all
Related
I updated a firebase function to node 16 and I'm getting the following deploy error:
Build failed: ...ve_cv_t' is not a member of 'std'
npm ERR! !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR! ^~~~~~~~~~~
npm ERR! /www-data-home/.cache/node-gyp/16.18.1/include/node/v8-internal.h:492:38: note: suggested alternative: 'remove_cv'
npm ERR! !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR! ^~~~~~~~~~~
npm ERR! remove_cv
npm ERR! /www-data-home/.cache/node-gyp/16.18.1/include/node/v8-internal.h:492:38: error: 'remove_cv_t' is not a member of 'std'
npm ERR! /www-data-home/.cache/node-gyp/16.18.1/include/node/v8-internal.h:492:38: note: suggested alternative: 'remove_cv'
npm ERR! !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR! ^~~~~~~~~~~
npm ERR! remove_cv
npm ERR! /www-data-home/.cache/node-gyp/16.18.1/include/node/v8-internal.h:492:50: error: template argument 2 is invalid
npm ERR! !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR! ^
npm ERR! /www-data-home/.cache/node-gyp/16.18.1/include/node/v8-internal.h:492:63: error: '::Perform' has not been declared
npm ERR! !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR! ^~~~~~~
npm ERR! /www-data-home/.cache/node-gyp/16.18.1/include/node/v8-internal.h:492:63: note: suggested alternative: 'perror'
npm ERR! !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR! ^~~~~~~
npm ERR! perror
npm ERR! At global scope:
npm ERR! cc1plus: warning: unrecognized command line option '-Wno-cast-function-type'
npm ERR! make: *** [Release/obj.target/sharp/src/common.o] Error 1
I have already tried removing the cloud function and retrying deploy.
I updated firebase-admin, firebase-functions and #google-cloud/storage packages. I can run the function fine from the shell.
while trying to install dependencies for this project, npm install fails with
> npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: ecommerce-app#0.1.0
npm ERR! Found: react#17.0.2
npm ERR! node_modules/react
npm ERR! react#"latest" from the root project
npm ERR! peer react#"^16.8.0 || ^17.0.0" from #material-ui/core#4.11.4
npm ERR! node_modules/#material-ui/core
npm ERR! #material-ui/core#"latest" from the root project
npm ERR! peer #material-ui/core#"^4.0.0" from #material-ui/icons#4.11.2
npm ERR! node_modules/#material-ui/icons
npm ERR! #material-ui/icons#"latest" from the root project
npm ERR! 1 more (#material-ui/lab)
npm ERR! 10 more (react-dom, #material-ui/icons, #material-ui/lab, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! redux-form#"^8.3.6" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react#16.14.0
npm ERR! node_modules/react
npm ERR! peer react#"^16.4.2" from redux-form#8.3.7
npm ERR! node_modules/redux-form
npm ERR! redux-form#"^8.3.6" 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/gergo/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/gergo/.npm/_logs/2022-03-17T17_37_09_399Z-debug-0.log
EDIT
when running npm install --force, I got this other error
npm ERR! 2 warnings generated.
npm ERR! In file included from ../src/libsass/src/values.cpp:3:
npm ERR! In file included from ../src/libsass/src/values.hpp:4:
npm ERR! ../src/libsass/src/ast.hpp:1614:25: warning: loop variable 'numerator' of type 'const std::__1::basic_string<char>' creates a copy from type 'const std::__1::basic_string<char>' [-Wrange-loop-analysis]
npm ERR! for (const auto numerator : numerators)
npm ERR! ^
npm ERR! ../src/libsass/src/ast.hpp:1614:14: note: use reference type 'const std::__1::basic_string<char> &' to prevent copying
npm ERR! for (const auto numerator : numerators)
npm ERR! ^~~~~~~~~~~~~~~~~~~~~~
npm ERR! &
npm ERR! ../src/libsass/src/ast.hpp:1616:25: warning: loop variable 'denominator' of type 'const std::__1::basic_string<char>' creates a copy from type 'const std::__1::basic_string<char>' [-Wrange-loop-analysis]
npm ERR! for (const auto denominator : denominators)
npm ERR! ^
npm ERR! ../src/libsass/src/ast.hpp:1616:14: note: use reference type 'const std::__1::basic_string<char> &' to prevent copying
npm ERR! for (const auto denominator : denominators)
npm ERR! ^~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! &
npm ERR! 2 warnings generated.
npm ERR! In file included from ../src/binding.cpp:1:
npm ERR! In file included from ../../nan/nan.h:56:
npm ERR! In file included from /Users/gergo/.node-gyp/17.4.0/include/node/node.h:63:
npm ERR! In file included from /Users/gergo/.node-gyp/17.4.0/include/node/v8.h:25:
npm ERR! In file included from /Users/gergo/.node-gyp/17.4.0/include/node/v8-array-buffer.h:12:
npm ERR! In file included from /Users/gergo/.node-gyp/17.4.0/include/node/v8-local-handle.h:12:
npm ERR! /Users/gergo/.node-gyp/17.4.0/include/node/v8-internal.h:563:38: error: no template named 'remove_cv_t' in namespace 'std'; did you mean 'remove_cv'?
npm ERR! !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR! ~~~~~^~~~~~~~~~~
npm ERR! remove_cv
npm ERR! /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:697:50: note: 'remove_cv' declared here
npm ERR! template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_cv
npm ERR! ^
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/gergo/Documents/spring-boot-react-ecommerce-app/client/node_modules/node-gyp/lib/build.js:262:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:520:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Darwin 19.6.0
npm ERR! gyp ERR! command "/usr/local/Cellar/node/17.4.0/bin/node" "/Users/gergo/Documents/spring-boot-react-ecommerce-app/client/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd /Users/gergo/Documents/spring-boot-react-ecommerce-app/client/node_modules/node-sass
npm ERR! gyp ERR! node -v v17.4.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
EDIT
the second error is thrown while installing node-sass. my node version was not compatible with "node-sass": "^4.14.1". I have changed node-sass version to be compatible with my node version and this error went away. and the build is successful
For first error I tried to install npm by below 2 command in Terminal one after another. It fixes for me:
npm install --legacy-peer-deps
npm audit fix --force`
*N.B: Don't forget to restart terminal after installing
You are getting errors because of the #material-ui/core which is deprecated see: https://www.npmjs.com/package/#material-ui/core
the new package for material-ui is https://www.npmjs.com/package/#mui/material.
As they say here https://mui.com/guides/migration-v4/#update-react-amp-typescript-version
The minimum supported version of React was increased from v16.8.0 to v17.0.0.
You should consider upgrading your react and material ui, they also changed styling tool to emotion, you'll find more info about in the link above.
Also, they have pretty good migration guides for cases like yours, check https://mui.com/components/data-grid/migration-v4/#migrating-mui-core-from-v4
Temporary alternative can be using force install(npm install --force) but I really recommend upgrading your dependencies as otherwise there are no warranties that things will work.
install the dependencies like this:
npm install <dependencyname> --force
or if you want to install all dependencies at once,
npm install --force
the second error is thrown while installing node-sass.
my node version (17.4) was not compatible with "node-sass": "^4.14.1"
I have changed node-sass version to be compatible with my node version and this error went away. and the build is successful.
Is it still failing? for me npm install works without an error using node version 14.16.0
You need to upgrade your node-sass version to be compatible with the current LTS version of Node.js.
To do this, change your package.json file to include the following (replacing the old declaration).
{
"dependencies": {
"node-sass": "^7.0.1"
}
}
Then, run the following command, and there should be no errors.
$ npm install
Ignore the $, it is just to indicate the terminal.
Try changing package management to yarn. At present, most packages already support yarn, and its dependency processing is better.
yarn install
Tried all the above solutions but when I Removed all the dependencies and install them one by one, It worked.
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
I am getting node-gyp error while doing npm install.
It's mainly happening when a project has node-sass or env-cmd these kind of dependencies. While trying to install env-cmd package or node-sass it's getting this errors.
I am using macos bigsur v11.6.1. node version v16.14.0.
Can anybody help ?
npm ERR! ../src/libsass/src/ast.hpp:1616:14: note: use reference type 'const
std::string &' to prevent copying
npm ERR! for (const auto denominator : denominators)
npm ERR! ^~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! &
npm ERR! 2 warnings generated.
npm ERR! In file included from ../src/libsass/src/util.cpp:3:
npm ERR! ../src/libsass/src/ast.hpp:1614:25: warning: loop variable 'numerator' creates a copy from type 'const std::string' [-Wrange-loop-construct]
npm ERR! for (const auto numerator : numerators)
npm ERR! ^
npm ERR! ../src/libsass/src/ast.hpp:1614:14: note: use reference type 'const std::string &' to prevent copying
npm ERR! for (const auto numerator : numerators)
npm ERR! ^~~~~~~~~~~~~~~~~~~~~~
npm ERR! &
npm ERR! ../src/libsass/src/ast.hpp:1616:25: warning: loop variable 'denominator' creates a copy from type 'const std::string' [-Wrange-loop-construct]
npm ERR! for (const auto denominator : denominators)
npm ERR! ^
npm ERR! ../src/libsass/src/ast.hpp:1616:14: note: use reference type 'const std::string &' to prevent copying
npm ERR! for (const auto denominator : denominators)
npm ERR! ^~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! &
npm ERR! 2 warnings generated.
npm ERR! In file included from ../src/libsass/src/values.cpp:3:
npm ERR! In file included from ../src/libsass/src/values.hpp:4:
npm ERR! ../src/libsass/src/ast.hpp:1614:25: warning: loop variable 'numerator' creates a copy from type 'const std::string' [-Wrange-loop-construct]
npm ERR! for (const auto numerator : numerators)
npm ERR! ^
npm ERR! ../src/libsass/src/ast.hpp:1614:14: note: use reference type 'const std::string &' to prevent copying
npm ERR! for (const auto numerator : numerators)
npm ERR! ^~~~~~~~~~~~~~~~~~~~~~
npm ERR! &
npm ERR! ../src/libsass/src/ast.hpp:1616:25: warning: loop variable 'denominator' creates a copy from type 'const std::string' [-Wrange-loop-construct]
npm ERR! for (const auto denominator : denominators)
npm ERR! ^
npm ERR! ../src/libsass/src/ast.hpp:1616:14: note: use reference type 'const std::string &' to prevent copying
npm ERR! for (const auto denominator : denominators)
npm ERR! ^~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! &
npm ERR! 2 warnings generated.
npm ERR! In file included from ../src/binding.cpp:1:
npm ERR! In file included from ../../nan/nan.h:58:
npm ERR! In file included from /Users/macbookpro/.node-gyp/16.14.0/include/node/node.h:63:
npm ERR! In file included from /Users/macbookpro/.node-gyp/16.14.0/include/node/v8.h:30:
npm ERR! /Users/macbookpro/.node-gyp/16.14.0/include/node/v8-internal.h:492:38: error: no template named 'remove_cv_t' in namespace 'std'; did you mean 'remove_cv'?
npm ERR! !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR! ~~~~~^~~~~~~~~~~
npm ERR! remove_cv
npm ERR! /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:710:50: note: 'remove_cv' declared here
npm ERR! template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_cv
npm ERR! ^
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/macbookpro/Desktop/V2 projects/ecrm/latest/ecrm-training-frontend/node_modules/node-gyp/lib/build.js:262:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:520:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Darwin 20.6.0
npm ERR! gyp ERR! command "/usr/local/bin/node" "/Users/macbookpro/Desktop/V2 projects/ecrm/latest/ecrm-training-frontend/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd /Users/macbookpro/Desktop/V2 projects/ecrm/latest/ecrm-training-frontend/node_modules/node-sass
npm ERR! gyp ERR! node -v v16.14.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
From the comment by #alex-scott you can see many details.
What solved it for me was manual download:
https://github.com/nodejs/node-gyp/blob/HEAD/macOS_Catalina.md#installing-node-gyp-using-the-xcode-command-line-tools-via-manual-download
I downloaded the most recent version that does not require Monterey.
Command_Line_Tools_for_Xcode_13.2.dmg
xcode-select --install did NOT install the correct version.
I solve this error, I only need to use the command
yarn add node-sass
This update the node-sass and solve all the errors inside the packages when we try to install everything
EDIT:
Node-sass is already deprecated, you should check Sass instead
I can't install web3(1.2.4) on webstorm(on mac). I tried re-install webstorm, but it didn't work. My environment is mac os(10.14.6) & webstorm(2019.2.4).
Error messages are as follows:
/Users/Pierogi/Library/Preferences/WebStorm2019.2/node/node-v10.16.0-darwin-x64/bin/node /Users/Pierogi/Library/Preferences/WebStorm2019.2/node/node-v10.16.0-darwin-x64/lib/node_modules/npm/bin/npm-cli.js install web3#1.2.4
Standard error:
npm WARN deprecated #types/bignumber.js#5.0.0: This is a stub types definition for bignumber.js (https://github.com/MikeMcl/bignumber.js/). bignumber.js provides its own type definitions, so you don't need #types/bignumber.js installed!
npm WARN lifecycle The node binary used for scripts is /usr/local/bin/node but npm is using /Users/Pierogi/Library/Preferences/WebStorm2019.2/node/node-v10.16.0-darwin-x64/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
In file included from ../src/addon.cpp:9:
In file included from ../src/KeccakNISTInterface.h:17:
../src/KeccakSponge.h:23:9: warning: 'ALIGN' macro redefined [-Wmacro-redefined]
#define ALIGN __attribute__ ((aligned(32)))
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/param.h:83:9: note: previous definition is here
#define ALIGN(p) __DARWIN_ALIGN(p)
^
../src/addon.cpp:83:11: error: no matching member function for call to 'Set'
target->Set(className, f);
~~~~~~~~^~~
/Users/Pierogi/Library/Caches/node-gyp/13.1.0/include/node/v8.h:3424:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
^
/Users/Pierogi/Library/Caches/node-gyp/13.1.0/include/node/v8.h:3427:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
^
1 warning and 1 error generated.
make: *** [Release/obj.target/sha3/src/addon.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/Pierogi/Library/Preferences/WebStorm2019.2/node/node-v10.16.0-darwin-x64/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 18.7.0
gyp ERR! command "/usr/local/Cellar/node/13.1.0/bin/node" "/Users/Pierogi/Library/Preferences/WebStorm2019.2/node/node-v10.16.0-darwin-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/Pierogi/Documents/WebStorm project/191112/node_modules/sha3
gyp ERR! node -v v13.1.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm WARN bookshelf#1.0.1 requires a peer of knex#>=0.15.0 <0.20.0 but none is installed. You must install peer dependencies yourself.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sha3#1.2.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sha3#1.2.3 install 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/Pierogi/.npm/_logs/2019-11-19T13_11_28_555Z-debug.log
Standard output:
> sha3#1.2.3 install /Users/Pierogi/Documents/WebStorm project/191112/node_modules/sha3
> node-gyp rebuild
CXX(target) Release/obj.target/sha3/src/addon.o
Process finished with exit code 1
Try to install compilers and some supporting utilities by running:
xcode-select --install