我是角度和npm的新手。 我正在尝试添加kama和jasmine,所以我来到npm run build阶段,但我无法通过这一步。
这是我的package.json
{
"name": "angular2-boilerplate",
"version": "1.0.0",
"scripts": {
"lite": "lite-server",
"gulp": "gulp",
"start": "concurrent \"npm run gulp\" \"npm run lite\" "
},
"license": "ISC",
"dependencies": {
"angular2": "2.0.0-beta.14",
"systemjs": "0.19.25",
"es6-shim": "^0.35.0",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.2",
"zone.js": "0.6.6"
},
"devDependencies": {
"angular-mocks": "^1.6.1",
"autoprefixer": "^6.3.5",
"concurrently": "^2.0.0",
"cssnano": "^3.4.0",
"gulp": "^3.9.0",
"gulp-ext-replace": "^0.2.0",
"gulp-imagemin": "^2.4.0",
"gulp-postcss": "^6.0.1",
"gulp-sourcemaps": "^1.6.0",
"gulp-typescript": "^2.10.0",
"gulp-uglify": "^1.5.1",
"jasmine": "^2.5.2",
"karma": "^1.3.0",
"karma-chrome-launcher": "^2.0.0",
"karma-coverage": "^1.1.1",
"karma-jasmine": "^1.1.0",
"karma-phantomjs-launcher": "^1.0.2",
"lite-server": "^2.1.0",
"postcss": "^5.0.13",
"postcss-scss": "^0.1.3",
"precss": "^1.3.0"
}
}
有人可以帮我吗!非常感谢!
这是日志文件:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/5.11.0/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'run',
1 verbose cli 'build' ]
2 info using npm@3.8.6
3 info using node@v5.11.0
4 verbose stack Error: missing script: build
4 verbose stack at run (/usr/local/lib/node_modules/npm/lib/run-script.js:147:19)
4 verbose stack at /usr/local/lib/node_modules/npm/lib/run-script.js:57:5
4 verbose stack at /usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:345:5
4 verbose stack at checkBinReferences_ (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:309:45)
4 verbose stack at final (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:343:3)
4 verbose stack at then (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:113:5)
4 verbose stack at /usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:232:12
4 verbose stack at /usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:78:16
4 verbose stack at tryToString (fs.js:414:3)
4 verbose stack at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:401:12)
5 verbose cwd
6 error Darwin 15.6.0
7 error argv "/usr/local/Cellar/node/5.11.0/bin/node" "/usr/local/bin/npm" "run" "build"
8 error node v5.11.0
9 error npm v3.8.6
10 error missing script: build
11 error If you need help, you may report this error at:
11 error <https://github.com/npm/npm/issues>
12 verbose exit [ 1, true ]
答案 0 :(得分:0)
要运行您的应用程序,只需从命令提示符运行以下命令:
npm start