I am trying to install angular on my windows 10. I followed every step in the yo tutorial, but once I get to package.json everything fails and shows errors. can anyone help me figuring out how to solve this. I have tried for almost a week searching online and nothing has worked. Error shown bellow:
*? Overwrite package.json? overwrite
force package.json
identical .travis.yml
bower ENOGIT git is not installed or not in the PATH
> phantomjs#1.9.17 install C:\Users\carli\node_modules\phantomjs
> node install.js
grunt-cli: The grunt command line interface. (v0.1.13)
Fatal error: Unable to find local grunt.
If you're seeing this message, either a Gruntfile wasn't found or grunt
hasn't been installed locally to your project. For more information about
installing and configuring grunt, please see the Getting Started guide:
http://gruntjs.com/getting-started
> phantomjs#1.9.17 install C:\Users\carli\node_modules\phantomjs
> node install.js
module.js:338
throw err;
^
Error: Cannot find module 'C:\Users\carli\node_modules\phantomjs\install.js'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:286:25)
at Function.Module.runMain (module.js:475:10)
at startup (node.js:117:18)
at node.js:951:3
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\carli\\AppDat
Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v4.0.0
npm ERR! npm v2.14.3
npm ERR! code ELIFECYCLE
npm ERR! phantomjs#1.9.17 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the phantomjs#1.9.17 install script 'node install.js'.
npm ERR! This is most likely a problem with the phantomjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls phantomjs
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\carli\npm-debug.log
module.js:338
throw err;
^
Error: Cannot find module 'C:\Users\carli\node_modules\phantomjs\install.js'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:286:25)
at Function.Module.runMain (module.js:475:10)
at startup (node.js:117:18)
at node.js:951:3
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\carli\\AppDat
Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v4.0.0
npm ERR! npm v2.14.3
npm ERR! code ELIFECYCLE
npm ERR! phantomjs#1.9.17 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the phantomjs#1.9.17 install script 'node install.js'.
npm ERR! This is most likely a problem with the phantomjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls phantomjs
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\carli\npm-debug.log*
I am trying to learn about Angularjs and this is one of the steps that is holding me back
Related
I habe an azur app service (Linux), connected to a bitbucket git repository running.
When I try to deploy it, I get this error:
> lhfrontend#1.0.0 postinstall /home/site/wwwroot
> npm run webdriver:update
npm WARN invalid config loglevel="notice"
> lhfrontend#1.0.0 webdriver:update /home/site/wwwroot
> node ./node_modules/protractor/bin/webdriver-manager update
module.js:471
throw err;
^
Error: Cannot find module '/home/site/wwwroot/node_modules/protractor/bin/webdriver-manager'
An error has occurred during web site deployment.
at Function.Module._resolveFilename (module.js:469:15)
npm failed
at Function.Module._load (module.js:417:25)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:389:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:504:3
npm ERR! Linux 4.4.0-108-generic
npm ERR! argv "/opt/nodejs/6.11.0/bin/node" "/usr/bin/node_modules/npm/bin/npm-cli.js" "run" "webdriver:update"
npm ERR! node v6.11.0
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! lhfrontend#1.0.0 webdriver:update: `node ./node_modules/protractor/bin/webdriver-manager update`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the lhfrontend#1.0.0 webdriver:update script 'node ./node_modules/protractor/bin/webdriver-manager update'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the lhfrontend package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./node_modules/protractor/bin/webdriver-manager update
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs lhfrontend
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls lhfrontend
npm ERR! There is likely additional logging output above.
Does any one have an idea, how to fix this?
Thanks in advance,
Dennis
Check if you have installed protractor module. If not, run this command in your app's root:
npm install protractor
Or add this to the dependencies section of your package.json:
"dependencies": {
"protractor": "^5.2.2"
}
While installing angularjs on windows 7. It fails with the below message:
C:\angular.js>npm install
npm ERR! git rev-list -n1 ced17cbe52c1412b2ada53160432a5b681f37cd7: fatal: bad o
bject ced17cbe52c1412b2ada53160432a5b681f37cd7
npm ERR! git rev-list -n1 ced17cbe52c1412b2ada53160432a5b681f37cd7:
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\nodejs\\\\node.exe" "C:\\nodejs\\node_modules\\npm\\bin\\npm-
cli.js" "install"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code 128
npm ERR! Command failed: git -c core.longpaths=true rev-list -n1 ced17cbe52c1412
b2ada53160432a5b681f37cd7
npm ERR! fatal: bad object ced17cbe52c1412b2ada53160432a5b681f37cd7
npm ERR!
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! C:\angular.js\npm-debug.log
What is the reason for fatal bad object?
If you are installing angular with NPM inside the console window in an IDE like webstorm for example, you can try installing it with your powershell for example, i think that should solve this error.
Resolved!
Issue was with devDependencies "grunt-jasmine-node" mentioned in angularjs package.json file.
Changed it from "grunt-jasmine-node": "git://github.com/vojtajina/grunt-jasmine-node.git#fix-grunt-exit-code" to "grunt-jasmine-node": "~2.0.1"
grunt-jasmine-node was the referring to the fatal object
Hi I am trying to install and run angular-phonecat project.
install git ( windows ) from github
Opened git shell.cloned the probject.
I have node already installed so I opened node console and typed node --version.I got v0.10.9
back to git shell. did npm install in the angular-phonecat directory ( to install all dependencies as angular js suggests here:https://docs.angularjs.org/tutorial
I got following error then:
npm ERR! Error: No compatible version found: karma-chrome-launcher#'^0.1.4'
npm ERR! Valid install targets:
npm ERR! ["0.0.1","0.0.2","0.1.0","0.1.1","0.1.2","0.1.3","0.1.4","0.1.5"]
npm ERR! at installTargetsError (C:\Program Files (x86)\nodejs\node_modules\
npm\lib\cache.js:709:10)
npm ERR! at C:\Program Files (x86)\nodejs\node_modules\npm\lib\cache.js:631:
10
npm ERR! at saved (C:\Program Files (x86)\nodejs\node_modules\npm\node_modul
es\npm-registry-client\lib\get.js:138:7)
npm ERR! at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, 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! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program File
s (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd C:\Users\abc\angular-phonecat
npm ERR! node -v v0.10.9
npm ERR! npm -v 1.2.24
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\abc\angular-phonecat\npm-debug.log
npm ERR! not ok code 0
I have no idea what is wrong ?
----Nov 3 2014 update----I updated Node to version v0.10.33 and started getting below error when trying npm install on angular-phonecat directory.
npm WARN package.json karma-chrome-launcher#0.1.5 No README data
angular-phonecat#0.0.0 postinstall C:\abc\angular-phonecat
bower install
'bower' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! angular-phonecat#0.0.0 postinstall: `bower install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular-phonecat#0.0.0 postinstall script.
npm ERR! This is most likely a problem with the angular-phonecat package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! bower install
npm ERR! You can get their info via:
npm ERR! npm owner ls angular-phonecat
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program File
s (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd C:\abc\angular-phonecat
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\abc\angular-phonecat\npm-debug.log
npm ERR! not ok code 0
Open your package.json file and change "karma-chrome-launcher": "^0.1.4" with "karma-chrome-launcher": "0.1.4", that is, remove the caret. Same with all the dependencies that use that notation. You can see the meaning of the version numbers here.
https://www.npmjs.org/doc/files/package.json.html#dependencies
The ^ character means "Compatible with".
You can also try to upgrade node and npm, versions 0.10.9 and 1.2.24 are quite old now, and the ^ character is not supported in that version.
Caret was first available in npm from August 2013 and became the
default save prefix 6 months later in February 2014.
Which is npm version 1.3.7.
If it still does not work try npm cache clear and then npm install again.
If your problem is the proxy you can try npm config set proxy and npm config set https-proxy as described here jjasonclark.com/how-to-setup-node-behind-web-proxy.
Hope this helps.
Note: I have tried npm install on a fresh copy of this repository myself and it works, although not Windows and versions 0.10.28 and 1.4.9 respectively. So the package.json is correct, strictly speaking.
Im new to Angular JS. I'm following the tutorial which is provided in Angular JS website. I've cloned the git project and when I try for npm install it gives me errors like
npm ERR! Error: failed to fetch from registry: shelljs
npm ERR! at /usr/share/npm/lib/utils/npm-registry-client/get.js:139:12
npm ERR! at cb (/usr/share/npm/lib/utils/npm-registry-client/request.js:31:9)
npm ERR! at Request._callback (/usr/share/npm/lib/utils/npm-registry- client/request.js:136:18)
npm ERR! at Request.callback (/usr/lib/nodejs/request/main.js:119:22)
npm ERR! at Request.<anonymous> (/usr/lib/nodejs/request/main.js:212:58)
npm ERR! at Request.emit (events.js:88:20)
npm ERR! at ClientRequest.<anonymous> (/usr/lib/nodejs/request/main.js:412:12)
npm ERR! at ClientRequest.emit (events.js:67:17)
npm ERR! at HTTPParser.onIncoming (http.js:1261:11)
npm ERR! at HTTPParser.onHeadersComplete (http.js:102:31)
npm ERR! You may report this log at:
npm ERR! <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR! reportbug --attach /home/bigc/Angular-Tutorial/angular-phonecat/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.5.0-23-generic
npm ERR! command "node" "/usr/bin/npm" "install"
npm ERR! cwd /home/bigc/Angular-Tutorial/angular-phonecat
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message failed to fetch from registry: shelljs
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/bigc/Angular-Tutorial/angular-phonecat/npm-debug.log
npm not ok
Do I need to do anything other than cloning?
Cheers!
when i started sometimes i have foun error too with cloning git repository, make a check for your version of github and update it if you need it, after you do that you can go directly to angularjs's github page, the tutorial you want to see it's in the sample folder, you cant take it form here or cloning directly from the address write on the right of the page.
I just create an empty directory called "assets" with my php lavarel project folder and issue the following command -> yo angular, then in the terminal, I was asked include sass/compass, bootstrap etc and start installing this generator. somehow, I got lots of errors that i have no ideas what that cause. I need some help and here are the errors.
npm npm ERR!http Error: ENOTEMPTY, rmdir 'xxx/app/assets/node_modules/grunt/lib'
GET https://registry.npmjs.org/optimist
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Darwin 13.1.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd xxx/app/assets
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! path xxx/app/assets/node_modules/grunt/lib
npm ERR! code ENOTEMPTY
npm ERR! errno 53
npm ERR! Error: ENOENT, open 'xxx/app/assets/node_modules/grunt/package.json'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Darwin 13.1.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "grunt-karma" "karma-ng-html2js-preprocessor" "karma-ng-scenario" "--save-dev"
npm ERR! cwd xxx/app/assets
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! path xxx/app/assets/node_modules/grunt/package.json
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! xxx/app/assets/npm-debug.log
npm ERR! not ok code 0
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! xxx/assets/npm-debug.log
npm ERR! not ok code 0
Looks like your user don't own your project folder. chown and chmod your folder so it work with the your user account.