i´m new in web development. I´m getting this Error Message after running the command: npm install.
May somebody can help me.
Message:
PS C:\Users\Giu\node_modules\npm> npm install
npm WARN deprecated coffee-script#1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
> npm#6.4.1 prepare C:\Users\Giu\node_modules\npm
> node bin/npm-cli.js --no-audit --no-timing prune --prefix=. --no-global && rimraf test/*/*/node_modules && make -j4 doc
up to date in 4.661s
Der Befehl "rimraf" ist entweder falsch geschrieben oder
konnte nicht gefunden werden. English: The command "rimraf" is either wrong written or it cant be find.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! npm#6.4.1 prepare: `node bin/npm-cli.js --no-audit --no-timing prune --prefix=. --no-global && rimraf test/*/*/node_modules && make -j4 doc`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the npm#6.4.1 prepare 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! C:\Users\Giu\AppData\Roaming\npm-cache\_logs\2018-10-16T06_40_26_185Z-debug.log
Message end
Thank you!
In order to install npm download node.js it will be already installed with it.
CLICK HERE
To download dependencies from package.json use npm install or npm i.
To make depencies use initially type npm init ,and fill the sufficient details to make your project dependency.
to install npm download node.js and npm will also be installed check this link
then you can install angular cli globally like this npm install -g #angular/cli#latest
then you create angular project using this command ng new projectNameand also check this link
then move to project folder cd projectName
then install all the project dependencies from package.json using npm install
then finally you can run the project and run on browser using ng serve --open
Related
I am trying to install the required node_modules for a small project running Angular 11 using npm install
My goal is get the project to work locally after downloading it from GitHub. I have already installed the latest version of the Angular CLI.
After running the install command I tried npm start.
I was expecting that after running the install and start command to be able to run the project locally.
However the actual result I get after running the install command is the following list of errors:
> ng serve
An unhandled exception occurred: Cannot find module '#angular/compiler'
Require stack:
\node_modules\#angular\compiler-cli\index.js
\node_modules\#ngtools\webpack\src\angular_compiler_plugin.js
\node_modules\#ngtools\webpack\src\index.js
\node_modules\#angular-devkit\build-angular\src\webpack\configs\typescript.js
\node_modules\#angular-devkit\build-angular\src\webpack\configs\index.js
\node_modules\#angular-devkit\build-angular\src\browser\index.js
\node_modules\#angular-devkit\build-angular\src\dev-server\index.js
\node_modules\#angular-devkit\architect\node\node-modules-architect-host.js
\node_modules\#angular-devkit\architect\node\index.js
\node_modules\#angular\cli\models\architect-command.js
\node_modules\#angular\cli\commands\serve-impl.js
\node_modules\#angular-devkit\schematics\tools\export-ref.js
\node_modules\#angular-devkit\schematics\tools\index.js
\node_modules\#angular\cli\utilities\json-schema.js
\node_modules\#angular\cli\models\command-runner.js
\node_modules\#angular\cli\lib\cli\index.js
\node_modules\#angular\cli\lib\init.js
\node_modules\#angular\cli\bin\ng
See "angular-errors.log" for further details.
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file C:\WINDOWS\system32\cmd.exe
npm ERR! errno ENOENT
npm ERR! `ng serve`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the #0.0.16 start 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:
The problem is that this Angular project also has peer dependencies. I installed npm-install-peers package but it seems that simply running npm install afterwards will not install the required peer dependencies.
What should I do next to get this Angular project installed locally ?
The issue you are facing is likely because angular cli or npm-peer-dependencies are not installed globally on your machine.
The steps that you should take are to make sure of them are globally installed.
To install packages globally you need run npm install -g <package_name>
npm docs link
In your case for angular cli you should run
npm i -g #angular/cli#11.2.15 and npm install -g npm-peer-dependencies.
Then run npm start.
I'm a newbie in coding so please take it easy on me.
I have project on github, made by softwarehouse - its MVP of an app made with Django Rest framework, React app, Docker.
Now I want to run it on my mac, and there is an issue.
When i run docker-compose.yml i start with docker-compose up, it is instaling all packages untill it goes to the step where it tries to instal npm, and i get an error:
npm notice
npm notice New patch version of npm available! 7.4.0 -> 7.4.3
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v7.4.3>
npm notice Run `npm install -g npm#7.4.3` to update!
npm notice
ERROR: Service 'pet-frontend' failed to build : The command '/bin/sh -c npm install --silent' returned a non-zero code: 1
Failed to deploy 'Compose: docker-compose.yml': `docker-compose` process finished with exit code 1
I don't know why i cannot instal latest version? I have newest node.js where npm is 7.4.0.
How i can force install of 7.4.0 or how to install 7.4.0? so deployment could go further?
__ more info __
frontend dockerfile looks like this:
FROM node:latest
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
COPY package.json ./
RUN npm install --silent
RUN npm install react-scripts#3.4.1 -g --silent
COPY . ./
CMD ["npm", "start"]
when i add there 'RUN npm install -g npm#7.4.3' - still get the same error
When i run npm without --silent i get this error:
npm notice
npm notice New patch version of npm available! 7.4.0 -> 7.4.3
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v7.4.3>
npm notice Run `npm install -g npm#7.4.3` to update!
npm notice
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: prop-types#15.6.0
npm ERR! node_modules/prop-types
npm ERR! peer prop-types#"<=15.6.0" from check-prop-types#1.1.2
npm ERR! node_modules/check-prop-types
npm ERR! dev check-prop-types#"^1.1.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! react-leaflet-search#"^2.0.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: prop-types#15.7.2
npm ERR! node_modules/prop-types
npm ERR! peer prop-types#"^15.7.2" from react-leaflet-search#2.0.1
npm ERR! node_modules/react-leaflet-search
npm ERR! react-leaflet-search#"^2.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 /root/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-01-26T10_49_01_333Z-debug.log
ERROR: Service 'petsy-frontend' failed to build : The command '/bin/sh -c npm install' returned a non-zero code: 1
Failed to deploy 'Compose: docker-compose.yml': `docker-compose` process finished with exit code 1
I added the following line before npm install and it worked for me. It picks the latest npm version and install in your directory
RUN npm install -g npm#7.19.1
npm install npm#{latest version}
You can use this, it worked for me just now
I Have a Problem about NPM, I want to instal npm react-native with command npm install -g react-native-cli on cmd,
But, an error suddenly appeared like this :
npm ERR! path C:\Users\Xeon\AppData\Roaming\npm\react-native.cmd
npm ERR! code EEXIST
npm ERR! Refusing to delete C:\Users\Xeon\AppData\Roaming\npm\react-native.cmd: is outside C:\Users\Xeon\AppData\Roaming\npm\node_modules\react-native-cli and not a link
npm ERR! File exists: C:\Users\Xeon\AppData\Roaming\npm\react-native.cmd
npm ERR! Move it away, and try again.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Xeon\AppData\Roaming\npm-cache\_logs\2020-02-12T03_00_40_156Z-debug.log
I don't know why this error appears, hopefully I can find a solution here.
thank you
Check your npm/node version, make sure they install correctly
currently there's no need to install react-native-cli for RN 0.61
you should try
npx react-native init ProjectName
or just using expo instead
npm install -g expo-cli
expo init AwesomeProject
Lastly, you should read the Official Doc for more details.
I installed nodejs and npm on windows 10. Than I tried to install cypress via npm install cypress --save-dev and get the following Error:
> node index.js --exec install
The command "node" is either misspelled or
could not be found.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! cypress#3.8.2 postinstall: `node index.js --exec install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the cypress#3.8.2 postinstall 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! C:\Users\U\AppData\Roaming\npm-cache\_logs\2020-01-21T11_05_01_566Z-debug.log
After this I added the path %USERPROFILE%\AppData\Local\Temp to my system environment variables. But I get this error messages again. How can I fix this problem?
try the following steps :
install git on your machine and config it as global.
delete old package.js then re-init new package.
try again cypress install command
Try this instead by installing the previous version but Explicitly: npm install cypress#8.1.0 --save-dev
Download it in the any directory its a hack to download, if your proxy is properly configured and internet speed is good. it will download while doing npm install
wget https://cdn.cypress.io/desktop/7.6.0/win32-x64/cypress.zip
Provide the zip location
CYPRESS_INSTALL_BINARY=~/Downloads/cypress.zip npm install cypress
Remember to actually run the npm command inside your folder with the package.json.
Delete the package.json.
Again re build the package by npm init.
Install Cypress again by using npm install cypress --save-dev.
i want to install expo-cli on my windows 10 to start a new react native project : i have node js installed with version v10.15.0 but when i enter : "npm install -g expo-cli" but some issus and this are the kind of errors that appears after the installation
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sharp#0.22.1 install: (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sharp#0.22.1 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! C:\Users\sami_\AppData\Roaming\npm-cache_logs\2019-05-21T18_38_29_235Z-debug.log
For me, I used yarn instead of npm.
yarn global add sharp
Then
yarn global add expo-cli
After that, if you run
expo
And got
expo is not a command
Which means you need to
add yarn global packages to the envirmonment variable. And your yarn global packages might in C:\Users\username\AppData\Local\Yarn\bin.
Also, I installed python 2.7 in the beginning. Not sure if it helps.
After wasting almost 1 day, I resolved this issue, this error is due to sharp
If you are having issues during installation consider removing the directory C:\Users[user]\AppData\Roaming\npm-cache_libvips
npm install -g sharp # (The installation require python 2.7 on windows and path env configuration)
npm install -g expo-cli
Deleting the expo-cli folder in AppData\Roaming\npm\node_modules then reinstalling expo worked for me.