I have been having this issue for many weeks now. I am unable to install/start this project after cloning from the repository.
When I use "npm start"
Could not find module "#angular-devkit/build-angular" from ...
When I use "npm i"
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: karma-jasmine-html-reporter#1.5.4
npm ERR! Found: jasmine-core#3.3.0
npm ERR! node_modules/jasmine-core
npm ERR! dev jasmine-core#"~3.3.0" from the root project
npm ERR! jasmine-core#"^3.3" from karma-jasmine#2.0.1
npm ERR! node_modules/karma-jasmine
npm ERR! dev karma-jasmine#"~2.0.1" from the root project
npm ERR! peer karma-jasmine#">=1.1" from karma-jasmine-html-reporter#1.5.4
npm ERR! node_modules/karma-jasmine-html-reporter
npm ERR! dev karma-jasmine-html-reporter#"^1.5.4" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer jasmine-core#">=3.5" from karma-jasmine-html-reporter#1.5.4
npm ERR! node_modules/karma-jasmine-html-reporter
npm ERR! dev karma-jasmine-html-reporter#"^1.5.4" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: jasmine-core#4.3.0
npm ERR! node_modules/jasmine-core
npm ERR! peer jasmine-core#">=3.5" from karma-jasmine-html-reporter#1.5.4
npm ERR! node_modules/karma-jasmine-html-reporter
npm ERR! dev karma-jasmine-html-reporter#"^1.5.4" from the root project
When I use "npm i --legacy-peer-deps"
npm ERR! Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --library=static_library
npm ERR! gyp info spawn C:\Program Files\Microsoft Visual Studio\2022\Community\Msbuild\Current\Bin\MSBuild.exe
npm ERR! gyp ERR! node -v v16.13.2
npm ERR! gyp ERR! node-gyp -v v9.1.0
npm ERR! gyp ERR! Node-gyp failed to build your package.
npm ERR! gyp ERR! Try to update npm and/or node-gyp and if it does not help file an issue with the package author.
npm ERR! node-pre-gyp ERR! node -v v16.13.2
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.13.0
npm ERR! node-pre-gyp ERR! not ok
What I have done
I have reinstall node
Delete package-lock.json/package.json and then "npm i"
Reclone the git repostory
Reinstall Visual Studio Code
Install Visual Studio Installer
Npm update
I faced same issue in past days when trying to npm install using node with too new version of npm (angualar 14, node 14.16/16.13/18.7, npm 8.15). Try to downgrade npm version using
npm install -g npm#version
I used npm#8.5.0 and it worked
Related
I want to install Ngb in Angular.
I use n Node.js version v19.1.0. I already tried --force and --legacy-pear-drops. Also i tried reinstalling Node.js.
The log:
`npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: markb#0.0.0
npm ERR! Found: #angular/core#14.2.2
npm ERR! node_modules/#angular/core
npm ERR! peer #angular/core#"14.2.2" from #angular/animations#14.2.2
npm ERR! node_modules/#angular/animations
npm ERR! peerOptional #angular/animations#"14.2.2" from #angular/platform-browser#14.2.2
npm ERR! node_modules/#angular/platform-browser
npm ERR! peer #angular/platform-browser#"14.2.2" from #angular/forms#14.2.2
npm ERR! node_modules/#angular/forms
npm ERR! #angular/forms#"^14.1.0" from the root project
npm ERR! 3 more (#angular/platform-browser-dynamic, #angular/router, the root project)
npm ERR! #angular/animations#"^14.1.0" from the root project
npm ERR! peer #angular/core#"14.2.2" from #angular/common#14.2.2
npm ERR! node_modules/#angular/common
npm ERR! peer #angular/common#"14.2.2" from #angular/forms#14.2.2
npm ERR! node_modules/#angular/forms
npm ERR! #angular/forms#"^14.1.0" from the root project
npm ERR! peer #angular/common#"14.2.2" from #angular/platform-browser#14.2.2
npm ERR! node_modules/#angular/platform-browser
npm ERR! peer #angular/platform-browser#"14.2.2" from #angular/forms#14.2.2
npm ERR! node_modules/#angular/forms
npm ERR! #angular/forms#"^14.1.0" from the root project
npm ERR! 3 more (#angular/platform-browser-dynamic, #angular/router, the root project)
npm ERR! 3 more (#angular/platform-browser-dynamic, #angular/router, the root project)
npm ERR! 6 more (#angular/compiler, #angular/forms, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! #ng-bootstrap/ng-bootstrap#"13.1.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: #angular/core#14.2.12
npm ERR! node_modules/#angular/core
npm ERR! peer #angular/core#"14.2.12" from #angular/forms#14.2.12
npm ERR! node_modules/#angular/forms
npm ERR! #angular/forms#"^14.1.0" from the root project
npm ERR! peer #angular/forms#"^14.1.0" from #ng-bootstrap/ng-bootstrap#13.1.1
npm ERR! node_modules/#ng-bootstrap/ng-bootstrap
npm ERR! #ng-bootstrap/ng-bootstrap#"13.1.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 C:\Users\thomas\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\thomas\AppData\Local\npm-cache_logs\2022-11-24T10_07_23_103Z-debug-0.log
× Packages installation failed, see above.`
I expected installs Bootstrap
First try npm config set legacy-peer-deps true. Maybe you must also run npm audit fix See also angular bootstrap is giving error on angular 13 project
I strongly recommend using Angular CLI for setting up a new project. If you have an Angular ≥ 9 CLI project.
Just run the following:
ng add #ng-bootstrap/ng-bootstrap
It will install ng-bootstrap for the default application specified in your angular.json. If you have multiple projects and you want to target a specific application, you could specify the --project option
ng add #ng-bootstrap/ng-bootstrap --project myProject
hello i try to run npm install -g yo but i have got error :
npm install -g yo
npm http GET https://registry.npmjs.org/yo
npm http 304 https://registry.npmjs.org/yo
npm ERR! Error: No compatible version found: yo
npm ERR! No valid targets found.
npm ERR! Perhaps not compatible with your version of node?
npm ERR! at installTargetsError (/usr/local/lib/node_modules/npm/lib/cache.js:486:10)
npm ERR! at next_ (/usr/local/lib/node_modules/npm/lib/cache.js:436:17)
npm ERR! at next (/usr/local/lib/node_modules/npm/lib/cache.js:413:44)
npm ERR! at /usr/local/lib/node_modules/npm/lib/cache.js:406:5
npm ERR! at saved (/usr/local/lib/node_modules/npm/lib/utils/npm-registry-client/get.js:151:7)
npm ERR! at Object.oncomplete (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:230:7)
npm ERR! You may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR!
npm ERR! System Linux 3.13.0-36-generic
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "yo"
npm ERR! cwd /home
npm ERR! node -v v0.6.18
npm ERR! npm -v 1.1.21
npm ERR! message No compatible version found: yo
npm ERR! message No valid targets found.
npm ERR! message Perhaps not compatible with your version of node?
npm ERR! Error: EACCES, open 'npm-debug.log'
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR!
npm ERR! System Linux 3.13.0-36-generic
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "yo"
npm ERR! cwd /home
npm ERR! node -v v0.6.18
npm ERR! npm -v 1.1.21
npm ERR! path npm-debug.log
npm ERR! code EACCES
npm ERR! message EACCES, open 'npm-debug.log'
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/npm-debug.log
I havent got any idea what is wrong my npm version is 1.1.21 my node version is v0.6.18
Can you give me some advice what is wrong with that configuration ?
You need to upgrade your version of Node.js and npm.
From the Yeoman website:
Install prerequisites
Before installing Yeoman, you will need the following:
Node.js v0.10.x+
npm (which comes bundled with Node) v1.4.3+
git
Thanks before starting, Am a kinda of a newbie using yeoman for seeding my new project. I tried to install using, this command
npm install -g yo
i get this error
npm ERR! Error: No compatible version found: yo
npm ERR! No valid targets found.
npm ERR! Perhaps not compatible with your version of node?
npm ERR! at installTargetsError (/usr/share/npm/lib/cache.js:488:10)
npm ERR! at next_ (/usr/share/npm/lib/cache.js:438:17)
npm ERR! at next (/usr/share/npm/lib/cache.js:415:44)
npm ERR! at /usr/share/npm/lib/cache.js:408:5
npm ERR! at saved (/usr/share/npm/lib/utils/npm-registry-client/get.js:147:7)
npm ERR! at Object.oncomplete (/usr/lib/nodejs/graceful-fs.js:230:7)
npm ERR! You may report this log at:
npm ERR! <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR! reportbug --attach /root/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.8.0-29-generic
npm ERR! command "node" "/usr/bin/npm" "install" "-g" "yo"
npm ERR! cwd /root
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message No compatible version found: yo
npm ERR! message No valid targets found.
npm ERR! message Perhaps not compatible with your version of node?
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /root/npm-debug.log
my node version is, v0.6.12,
my npm version is, 1.1.4
Help will be mush appreciated.
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
I get the following error
-----> Installing dependencies with npm
> bignum#0.5.1 install /tmp/build_1xz3suiyqvjwh/node_modules/bignum
> node-gyp configure build
sh: node-gyp: not found
npm ERR! error installing bignum#0.5.1 Error: bignum#0.5.1 install: `node-gyp configure build`
npm ERR! error installing bignum#0.5.1 `sh "-c" "node-gyp configure build"` failed with 127
npm ERR! error installing bignum#0.5.1 at ChildProcess.<anonymous> (/tmp/node-npm-Pi2L/lib/utils/exec.js:49:20)
npm ERR! error installing bignum#0.5.1 at ChildProcess.emit (events.js:70:17)
npm ERR! error installing bignum#0.5.1 at maybeExit (child_process.js:358:16)
npm ERR! error installing bignum#0.5.1 at Process.onexit (child_process.js:394:5)
npm ERR! bignum#0.5.1 install: `node-gyp configure build`
npm ERR! `sh "-c" "node-gyp configure build"` failed with 127
npm ERR!
npm ERR! Failed at the bignum#0.5.1 install script.
npm ERR! This is most likely a problem with the bignum package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp configure build
npm ERR! You can get their info via:
npm ERR! npm owner ls bignum
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Linux 2.6.32-343-ec2
npm ERR! command "/tmp/node-node-8eWj/bin/node" "/tmp/node-npm-Pi2L/cli.js" "install" "--production"
npm ERR! cwd /tmp/build_1xz3suiyqvjwh
npm ERR! node -v v0.6.20
npm ERR! npm -v 1.0.106
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /tmp/build_1xz3suiyqvjwh/npm-debug.log
npm not ok
! Failed to install --production dependencies with npm
! Heroku push rejected, failed to compile Node.js app