node.js - How to run angularjs app on node server? -
i have make angularjs app , run on wamp server running fine want move on node express after reading made change in package.json file follow:
{ "name": "example", "namelower": "example", "version": "0.0.1", "description": "an example angularjs project", "readme": "readme.md", "repository": { "type": "git", "url": "git@git.example.com:example.git" }, "devdependencies": { "grunt": "0.4.2", "grunt-contrib-concat": "0.3.0", "grunt-contrib-copy": "0.5.0", "grunt-contrib-jshint": "0.8.0", "grunt-contrib-nodeunit": "0.3.0", "grunt-contrib-uglify": "0.2.2", "grunt-contrib-watch": "0.5.3", "grunt-exec": "0.4.5", "grunt-jsdoc": "0.5.4", "grunt-karma": "0.8.3", "karma": "0.12.16", "karma-jasmine": "0.1.5", "karma-ng-html2js-preprocessor": "^0.1.2", "karma-phantomjs-launcher": "0.1.4" }, "scripts": { "postinstall": "bower install", "test": "grunt build" }, "dependencies": { "protractor": "^2.1.0" "express" : "~4.7.2", "mongoose" : "~3.6.2", "morgan" : "~1.2.2", "body-parser": "~1.5.2", "method-override": "~2.1.2" } }
after editing package.json ran npm install on cmd
error:c:\wamp\www\first-angular-app>npm install npm err! install couldn't read dependencies npm err! windows_nt 6.2.9200 npm err! argv "c:\\program files\\nodejs\\\\node.exe" "c:\\program files\\nod
\node_modules\npm\bin\npm-cli.js" "install" npm err! node v0.12.7 npm err! npm v2.11.3 npm err! file c:\wamp\www\first-angular-app\package.json npm err! code ejsonparse
npm err! failed parse json npm err! unexpected token 'e' @ 34:6 npm err! "express" : "~4.7.2", npm err! ^ npm err! file: c:\wamp\www\first-angular-app\package.json npm err! failed parse package.json data. npm err! package.json must actual json, not javascript. npm err! npm err! not bug in npm. npm err! tell package author fix package.json file. json.parse npm err! please include following file support request: npm err! c:\wamp\www\first-angular-app\npm-debug.log
how can , other changes need run app on node express??
you're missing comma after "protractor": "^2.1.0"
on line 33.
if can instead of writing package.json hand use npm init
, install packages console using --save
. way avoid typos.
Comments
Post a Comment