Error installing ionic on windows 10 - node.js

C:\Program Files>npm install -g ionic cordova
C:\Users\myname\AppData\Roaming\npm
`-- ionic#2.1.4
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "ionic" "cordova"
npm ERR! node v7.0.0
npm ERR! npm v3.10.8
npm ERR! path C:\Users\myname\AppData\Roaming\npm\node_modules\.staging\abbrev-514e00ac
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\myname\AppData\Roaming\npm\node_modules\.staging\abbrev-514e00ac' -> 'C:\Users\myname\AppData\Roaming\npm\node_modules\cordova\node_modules\npm\node_modules\ab brev'
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\myname\AppData\Roaming\npm\node_modules\.staging\abbrev-514e00ac' -> 'C:\Users\myname\AppData\Roaming\npm\node_modules\cordova\node_modules\npm\node_modules\abbrev'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "ionic" "cordova"
npm ERR! node v7.0.0
npm ERR! npm v3.10.8
npm ERR! path C:\Program Files\npm-debug.log.3790864127
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall open
npm ERR! Error: EPERM: operation not permitted, open 'C:\Program Files\npm-debug.log.3790864127'
npm ERR! { Error: EPERM: operation not permitted, open 'C:\Program Files\npm-debug.log.3790864127'
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'open',
npm ERR! path: 'C:\\Program Files\\npm-debug.log.3790864127' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Program Files\npm-debug.log
I have been trying to install ionic on my windows laptop. Before installing ionic on my laptop, I installed nodejs. But after that, everytime I try to install ionic, it shows this error on my command prompt. I also looked for similar problems on this website as well as other but couldn't find any that actually solves my problem. I also looked at npm install -g cordova and ionic 2 error ionic on window 10][1]
but the solution provided there would not work either.

Please Follow These Steps:-
1- First check that you have the latest node version.
2- Then search for Command Prompt and RUN IT AS ADMINISTRATOR.
3- then type the above commands :-
npm install -g ionic
npm install -g cordova

Open nodejs command prompt with administrator permission, redirect to c:> drive, then try same command which you used.
npm install -g ionic cordova
If you still getting the error, then it may be the problem with your node version here is link to refer about this issue and answer from ionic team

I solved this problem by uninstalling my nodejs and then installing the new one, nodejs v 5.11

Related

Not able to installing sails.js

I have node and npm versions :
C:\Windows\system32>node -v
v4.5.0
C:\Windows\system32>npm -v
3.10.6
I tried to install sails.js as administator
npm install -g sails
In C:\Program Files\nodejs\node_modules\
It has created a .staging file folder
and then sails folder...
but again later .staging folder got deleted automatically...
And at administator console log ended with this error...
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\sjammulamada\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\
npm-cli.js" "install" "-g" "sails"
npm ERR! node v4.5.0
npm ERR! npm v3.10.6
npm ERR! path C:\Program Files\nodejs\node_modules\.staging\lodash-86452639
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Program Files\nodejs\node_modules\.staging\lodash-86452639' ->
'C:\Program Files\nodejs\node_modules\sails\node_modules\anchor\node_modules\lodash'
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Program Files\nodejs\node_modules\.staging\lodash-86452639' ->
'C:\Program Files\nodejs\node_modules\sails\node_modules\anchor\node_modules\lodash'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! C:\Windows\system32\npm-debug.log
npm ERR! code 1
I tried
npm cache clean
and then tried to install sails.js ..but still no results ... I must be missing somthing let me know..
You should run command line as administrator then
npm cache clean
now you are ready to install sailsjs
npm install -g sails
if still issue then you may try
npm install -g sails --ignore-scripts

installing npm with gitlab and ssh give ENOENT errors although the file exists

I have been having an issue on Windows 7. I have been using the following npm command to install a package from a git-labs repository.
npm install --save git+ssh://git#156.67.38.79:mma/node-typescript-bundle.git
The error I get is as follows.
It fails with the following.
$ npm install --save git+ssh://git#156.67.38.79:mma/node-typescript- bundle.git
npm ERR! addLocal Could not install C:\Users\Operator\AppData\Local\Temp\npm-7556-2bcb63a8\git-cache-ff531437\b3f389becc07c9c83e86c17919f3e869f098f123
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--save" "git+ssh://git#156.67.38.79:mma/node-typescript-bundle.git"
npm ERR! node v6.4.0
npm ERR! npm v3.10.3
npm ERR! path C:\Users\Operator\Dev\npm-ccache\node-typescript -bundle\1.0.0\package.tgz
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall scandir
npm ERR! enoent ENOENT: no such file or directory, scandir 'C:\Users\Operator\Dev\npm-ccache\node-typescript-bundle\1.0.0\package.tgz'
npm ERR! enoent ENOENT: no such file or directory, scandir'C:\Users\Operator\Dev\npm-ccache\node-typescript-bundle\1.0.0\package.tgz'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Operator\Desktop\npm-debug.log
I have taken the following steps.
Updated npm and node
Recreated the folders
npm cache clean
using the command prompt as administrator.
Searching for similar issues on google and stack overflow.
I am not sure what the issue is and any help would be appreciated. Usual npm install commands work perfectly fine.

Is it safe to use npm install with --force on production?

we are facing an interesting problem in our build server that prevents our app to install npm dependencies which causes most of our builds to fail.
We are using the build server Visual Studio Team Services which runs Windows. When we are trying to install npm dependencies we get the following error:
2016-04-13T12:44:25.0931743Z npm ERR! Windows_NT 6.3.9600
2016-04-13T12:44:25.0931743Z npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--production"
2016-04-13T12:44:25.0941742Z npm ERR! node v0.12.7
2016-04-13T12:44:25.0941742Z npm ERR! npm v2.11.3
2016-04-13T12:44:25.0951737Z npm ERR! path C:\NPM\Cache\repeating\1.1.3\package\package.json
2016-04-13T12:44:25.0951737Z npm ERR! code EPERM
2016-04-13T12:44:25.0951737Z npm ERR! errno -4048
2016-04-13T12:44:25.0981746Z npm ERR! Error: EPERM, rename 'C:\NPM\Cache\repeating\1.1.3\package\package.json'
2016-04-13T12:44:25.0991748Z npm ERR! at Error (native)
2016-04-13T12:44:25.0991748Z npm ERR! { [Error: EPERM, rename 'C:\NPM\Cache\repeating\1.1.3\package\package.json']
2016-04-13T12:44:25.1001741Z npm ERR! errno: -4048,
2016-04-13T12:44:25.1001741Z npm ERR! code: 'EPERM',
2016-04-13T12:44:25.1011746Z npm ERR! path: 'C:\\NPM\\Cache\\repeating\\1.1.3\\package\\package.json',
2016-04-13T12:44:25.1011746Z npm ERR! parent: 'babel-traverse' }
2016-04-13T12:44:25.1021741Z npm ERR!
2016-04-13T12:44:25.1021741Z npm ERR! Please try running this command again as root/Administrator.
2016-04-13T12:44:28.0020021Z npm ERR! Please include the following file with any support request:
2016-04-13T12:44:28.0029943Z npm ERR! C:\a\1\s\src\OrderEze.Web\npm-debug.log
2016-04-13T12:44:28.1069958Z ##[debug]rc:4294963248
2016-04-13T12:44:28.1079955Z Npm failed with error: C:\Program Files\nodejs\npm.cmd failed with return code: 4294963248
We found that if we try to install our dependencies using the force command, everything works fine:
npm install --force
My question is simple. Will we have any issues with this configuration? Why npm warns us about this command? Any idea can help :)

Install cordova on windows 10

I have problem installing cordova on windows 10, but it worked on another system. What am I doing wrong? I'm trying to install cordova using this command:
npm install -g cordova
But I get this error:
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "cordova"
npm ERR! node v5.1.0
npm ERR! npm v3.5.0
npm ERR! error:0906D06C:PEM routines:PEM_read_bio:no start line
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "cordova"
npm ERR! node v5.1.0
npm ERR! npm v3.5.0
npm ERR! path c:\npm-debug.log.12f467e1fd39888240297f05bb2d353b
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall open
npm ERR! Error: EPERM: operation not permitted, open 'c:\npm-debug.log.12f467e1fd39888240297f05bb2d353b'
npm ERR! at Error (native)
npm ERR! { [Error: EPERM: operation not permitted, open 'c:\npm-debug.log.12f467e1fd39888240297f05bb2d353b']
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'open',
npm ERR! path: 'c:\\npm-debug.log.12f467e1fd39888240297f05bb2d353b' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
As you see it said run command as an administrator in last line, so I used sudo before my command:
sudo npm install -g cordova
and then I get this error:
'sudo' is not recognized as an internal or external command, operable program or batch file.
I also run this command npm cache clean
But I get the same error.
Update:
I run node as an administrator but I get this error:
C:\Windows\system32>npm install -g ionic
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "ionic"
npm ERR! node v5.1.0
npm ERR! npm v3.3.12
npm ERR! error:0906D06C:PEM routines:PEM_read_bio:no start line
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
What am I doing wrong? Is this problem related to my OS or what?
Any help would be appreciated.
Windows does not have sudo command, try right click your cmd application and use run as administrator option.
Additional info: https://technet.microsoft.com/ru-ru/library/cc947813(v=ws.10).aspx
Try updating npm.
npm install npm -g --ca=null
npm config set ca=""

phonegap npm install error

I was installing phone gap.
In phone gap website its shows the commands and instructions.
I installed nodejs and executed the commands.
But resulted in error.
I tried
Node.js NPM error when installing PhoneGap on Windows 8
Can u give a step by step instruction ?
I have downloaded phonegap.zip
where do i place this ?
C:\Program Files\nodejs>npm install -g phonegap
npm ERR! not found: git
npm ERR!
npm ERR! Failed using git.
npm ERR! This is most likely not a problem with npm itself.
npm ERR! Please check if you have git installed and in your PATH.
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "phonegap"
npm ERR! cwd C:\Program Files\nodejs
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! code ENOGIT
npm ERR! Error: EPERM, open 'C:\Program Files\nodejs\npm-debug.log'
npm ERR! { [Error: EPERM, open 'C:\Program Files\nodejs\npm-debug.log']
npm ERR! errno: 50,
npm ERR! code: 'EPERM',
npm ERR! path: 'C:\\Program Files\\nodejs\\npm-debug.log' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "phonegap"
npm ERR! cwd C:\Program Files\nodejs
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! path C:\Program Files\nodejs\npm-debug.log
npm ERR! code EPERM
npm ERR! errno 50
npm ERR! stack Error: EPERM, open 'C:\Program Files\nodejs\npm-debug.log'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Program Files\nodejs\npm-debug.log
npm ERR! not ok code 0
I installed GIT and it worked!

Resources