themesberg / volt-react-dashboard

Free and open source React.js admin dashboard template and UI library based on Bootstrap 5
https://demo.themesberg.com/volt-react-dashboard
MIT License
917 stars 377 forks source link

Not possible to install packages using - npm install #6

Closed fbucek closed 3 years ago

fbucek commented 3 years ago

Not possible to install packages since https://npm.fontawesome.com requires password authorization.

  1. git clone https://github.com/themesberg/volt-react-dashboard.git
  2. cd volt-react-dashboard
  3. npm install --> error
1979 verbose stack HttpErrorAuthUnknown: Unable to authenticate, need: Basic realm="https://npm.fontawesome.com/",service="npm.fontawesome.com"
1979 verbose stack     at /usr/local/lib/node_modules/npm/node_modules/npm-registry-fetch/check-response.js:84:17
1979 verbose stack     at processTicksAndRejections (node:internal/process/task_queues:96:5)
1980 verbose statusCode 401
1981 verbose pkgid @fortawesome/free-solid-svg-icons@https://npm.fontawesome.com/@fortawesome/free-solid-svg-icons/-/5.15.3/free-solid-svg-icons-5.15.3.tgz
1982 verbose cwd /Users/fbucek/Documents/learning/volt-react-dashboard
1983 verbose Darwin 20.6.0
1984 verbose argv "/usr/local/Cellar/node/16.6.1/bin/node" "/usr/local/bin/npm" "install"
1985 verbose node v16.6.1
1986 verbose npm  v7.20.3
1987 error code E401
1988 error Incorrect or missing password.
1989 error If you were trying to login, change your password, create an
1989 error authentication token or enable two-factor authentication then
1989 error that means you likely typed your password in incorrectly.
1989 error Please try again, or recover your password at:
1989 error     https://www.npmjs.com/forgot
1989 error
1989 error If you were doing some other operation then your saved credentials are
1989 error probably out of date. To correct this please try logging in again with:
1989 error     npm login
1990 verbose exit 1
zoltanszogyenyi commented 3 years ago

Hey @fbucek,

Which version of Node and NPM are you using?

Thanks!

fbucek commented 3 years ago

❯ npm --version 7.20.5 ❯ node --version v16.6.1 macOS: 11.5.1

zoltanszogyenyi commented 3 years ago

Could not reproduce it. Can you please try deleting the node_modules/ folder and package-lock.json then try again?

fbucek commented 3 years ago

I did not have node_modules/ folder but after deleting package-lock.json and running npm install again, I got this error:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: @themesberg/volt-react-dashboard@1.0.0
npm ERR! Found: chartist@0.11.4
npm ERR! node_modules/chartist
npm ERR!   chartist@"^0.11.4" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer chartist@"^0.10.1" from react-chartist@0.14.4
npm ERR! node_modules/react-chartist
npm ERR!   react-chartist@"^0.14.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/fbucek/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/fbucek/.npm/_logs/2021-08-06T12_36_31_511Z-debug.log

Also tried to from scratch again ( git clone, npm install ) but with same result.

Tryied also run with suggested npm install --force but ends up with another many many errors when compiling libsass

...
npm ERR!   c++ '-DNODE_GYP_MODULE_NAME=binding' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/fbucek/.node-gyp/16.6.1/include/node -I/Users/fbucek/.node-gyp/16.6.1/src -I/Users/fbucek/.node-gyp/16.6.1/deps/openssl/config -I/Users/fbucek/.node-gyp/16.6.1/deps/openssl/openssl/include -I/Users/fbucek/.node-gyp/16.6.1/deps/uv/include -I/Users/fbucek/.node-gyp/16.6.1/deps/zlib -I/Users/fbucek/.node-gyp/16.6.1/deps/v8/include -I../../nan -I../src/libsass/include  -O3 -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-rtti -fno-exceptions -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/binding/src/binding.o.d.raw -I/usr/local/opt/llvm/include  -c -o Release/obj.target/binding/src/binding.o ../src/binding.cpp
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli   '/usr/local/Cellar/node/16.6.1/bin/node',
npm ERR! gyp verb cli   '/Users/fbucek/Documents/learning/volt-react-dashboard/node_modules/node-gyp/bin/node-gyp.js',
npm ERR! gyp verb cli   'rebuild',
npm ERR! gyp verb cli   '--verbose',
npm ERR! gyp verb cli   '--libsass_ext=',
npm ERR! gyp verb cli   '--libsass_cflags=',
npm ERR! gyp verb cli   '--libsass_ldflags=',
npm ERR! gyp verb cli   '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using node-gyp@3.8.0
npm ERR! gyp info using node@16.6.1 | darwin | x64
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp verb command configure []
npm ERR! gyp verb check python checking for Python executable "python2" in the PATH
npm ERR! gyp verb `which` succeeded python2 /usr/bin/python2
npm ERR! gyp verb check python version `/usr/bin/python2 -c "import sys; print "2.7.16
npm ERR! gyp verb check python version .%s.%s" % sys.version_info[:3];"` returned: %j
npm ERR! gyp verb get node dir no --target version specified, falling back to host node version: 16.6.1
npm ERR! gyp verb command install [ '16.6.1' ]
npm ERR! gyp verb install input version string "16.6.1"
npm ERR! gyp verb install installing version: 16.6.1
npm ERR! gyp verb install --ensure was passed, so won't reinstall if already installed
npm ERR! gyp verb install version is already installed, need to check "installVersion"
npm ERR! gyp verb got "installVersion" 9
npm ERR! gyp verb needs "installVersion" 9
npm ERR! gyp verb install version is good
npm ERR! gyp verb get node dir target node version installed: 16.6.1
...
zoltanszogyenyi commented 3 years ago

@fbucek you're using the latest version of Node, and not the LTS (which is recommended for everyone). If you don't necessarily need to use the latest version of Node, I suggest you downgrade to the LTS (long term support) version.

Check out https://nodejs.org/en/ for their recommendation.

@cordosvictor we will keep developing Volt React based on the Node LTS version, is that right? If there will be breaking changes with a new LTS version, we will update the library dependencies as well.

fbucek commented 3 years ago

@zoltanszogyenyi thank you, downgrading node to the LTS version worked.

I had to downgrade to node@14

brew install node@14
brew unlink node
brew uninstall node
brew link node@14 --force

Then version match LTS version and npm install and then npm start works.

❯ node -v
v14.17.4
JohannesMatsimbi commented 1 year ago

uhm HI,facing the same issue

and Node LTS is now v18.17.0,cant downgrade to 14 lol

HELP!?