While installing native script, I always get this error while executing this command:
npm i -g nativescript
This is the error.
Try the following to start clean and redo the installation:
npm remove nativescript -g
npm cache clear
npm install nativescript -g
Related
When using npx create-react-app my-app, I got this error:
You are running create-react-app 4.0.3, which is behind the latest release (5.0.1).
We no longer support global installation of Create React App.
Please remove any global installs with one of the following commands:
- npm uninstall -g create-react-app
- yarn global remove create-react-app
I used the command npm uninstall and also check out the getting started with react
but that links suggest the same process
of npx create-react-app my-app. I also used this command npm install react react-dom but this
only install a node modules and a package.json. It doesn't create the usual react boilerplate
and all. Anyone have any idea, please help.
Try this solution :
npx create-react-app#latest myApp
You first need to uninstall the glocal app and then clear the cache and then reinstall it.
npm uninstall -g create-react-app
npx clear-npx-cache
After doing this reinstall it by running following command
npx create-react-app my-app
If it still don't work make sure to update your npm and node version.
If you want to update the react and react-dom of the existing app to the latest version you can do it by following running the following code.
npm install --save react#latest
npm install --save react-dom#latest
If you want to download a specific version of react and react-dom then you can run the following code in your terminal.
npm install --save react#<version>
npm install --save react-dom#<version>
You need to replace with your desired version for example
npm install --save react#17
I try to config envirenment for launch tests on js.
Windows10, python 2.7
After input command npm -i I have error message:
I tried to use npm install --global --production windows-build-tools
Try installing the react, if you check closely the error 'npm WARN react-markdown#3.4.1 requires a peer of react#^15.0.0 ...'
npm install react --save
Also, you may try upgrading your react-native install. react-native is as v0.30.0 now
npm update react-native
I install AngularJs using the command npm install -g angular-cli and afterwards, when I was trying to create new project, I get the following error,
Cannot find module 'reflect-metadata'
What should I for resolve the error ?
I had to reintall nodeJS from their website and install reflect-metadata and portfinder using the following commands while being as superuser,
sudo npm install -g reflect-metadata
sudo npm install -g portfinder
Afterwards, I can create new project using the command,
ng new myProject
Upgrade npm by npm install -g npm.
If problem still exists try:
npm i -g reflect-metadata
Re-installing node.js worked for me.
I had installation issues of angular-cli on Windows 10 system.
The errors were related to Python dependencies and node-gyp. Something as below :
>execSync#1.0.2 install C:\Users\UserName\AppData\Roaming\npm\node_modules\angular-cli\node_modules\execSync
node install.js
[execsync v1.0.2] Attempting to compile native extensions.
{ Error: spawn node-gyp ENOENT
at exports._errnoException (util.js:1007:11)
Update
this seems to be fixed in newer releases and this solution is no longer required.
mukesh51 eventually solved the problem.
the installation seems to work in these steps:
npm install -g node-gyp
npm install -g windows-build-tools
npm install -g #angular/cli
I took these steps from here.
Uninstall
npm uninstall -g angular-cli
npm uninstall --save-dev angular-cli
Update Global package
npm uninstall -g #angular/cli
npm cache clean
npm install -g #angular/cli#latest
I too faced the same issue initially when I installed angular directly using bash. The installation was error completely. Then I attempted to install locally in my project (without removing the global one). That appeared to have solved the problem but got an error on creating a new app.
So i uninstalled everything :
npm uninstall -g #angular/cli
and the reinstalled Angular using Windows Power Shell(as Admin)
npm install -g #angular/cli
This solved the entire problem! Hope it helps!
Use windows power shell to install angular-cli. It will run without any issues.
Windows 10 Solution
Look back at the trace of installation steps ... you may see that it found the Angular binary in the following location:
C:\Program Files\Git\usr\local\node_modules\#angular\cli\bin
I added an ENVT variable using this path and ng worked fine after that
I tried using npm install -g #angular/cli
npm downloaded files successfully and copied files to AppData but not able to use ng -v
After that, I tried following:
npm cache clean --force
Removes npm cache forcefully if you get warning using npm cache clean.
Then try
npm install -g #angular/cli#latest
I have successfully installed by trying the above solution in Windows10.
Both the CLI and generated project have dependencies that require Node 8.9 or higher, together with NPM 5.5.1 or higher.
try update node.js and npm
npm uninstall -g #angular/cli
npm install -g #angular/cli
if doesn't work:
Close the terminal, open a new one or use CMD or Git for windows instead.
I have installed mean.io and ran sudo npm install. Actually following commands in sequence
sudo npm install -g meanio
mean init yourNewApp
cd yourNewApp
sudo npm install -g bower
sudo npm install
It is supposed to download and install angularjs libraries into public/system/lib. After doing the above steps public /system/lib is not created due to which when I start the application I get the error
events.js:72
throw er; // Unhandled 'error' event
^
Error: ENOENT, open '/home/santhosh/dev/scaleqa/mean_tut/old mean/temp/myapp/public/system/lib/bootstrap/dist/css/bootstrap.css'
[nodemon] app crashed - waiting for file changes before starting...
Is it something to do with certain npm/angularjs server being down. I have faced this problem earlier also but got fixed on 2nd try and I didn't bother to do more research. This became a big issue when I try to pull my repo into cloud and start the application. public/system/lib is added in .gitignore by default and is expected to be created during npm install.
I get following warnings with sudo npm install
npm WARN package.json mean-connect-mongo#0.4.3 No repository field.
npm WARN cannot run in wd mean#0.3.3 node node_modules/bower/bin/bower install (wd=/home/santhosh/dev/scaleqa/mean_tut/old mean/temp/myapp)
this is link to package.json
The problem maybe related to running npm install as sudo, which can cause problems. As mentioned in another stack overflow question, this can be worked around in a couple ways. But because it looks like this is being run from your home directory, you really shouldn't need to run npm install as root.
Try to issue the same commands, but the last without sudo:
sudo npm install -g meanio
mean init yourNewApp
cd yourNewApp
sudo npm install -g bower
npm install
Note that the reason you may need to run npm install -g <package> using sudo is because by default npm uses /usr/local for global installs, which can be a restricted directory. However, when you install a package locally (without the -g flag) you should not need to run as root.