Heroku应用程序错误Angularjs和Gulp
问题描述:
我已经在Heroku中安装了我的webapp Angular,但不起作用。 我尝试了很多我在网上找到的解决方案,但没有结果。Heroku应用程序错误Angularjs和Gulp
的package.json
{
"name": "yoangular",
"version": "0.0.0",
"dependencies": {},
"scripts": {
"start": "npm start"
},
"devDependencies": {
"gulp": "~3.9.0",
"gulp-autoprefixer": "~3.0.2",
"gulp-angular-templatecache": "~1.8.0",
"del": "~2.0.2",
"lodash": "~3.10.1",
"gulp-cssnano": "~2.1.1",
"gulp-filter": "~3.0.1",
"gulp-flatten": "~0.2.0",
"gulp-eslint": "~1.0.0",
"eslint-plugin-angular": "~0.12.0",
"gulp-load-plugins": "~0.10.0",
"gulp-size": "~2.0.0",
"gulp-uglify": "~1.4.1",
"gulp-useref": "~3.0.3",
"gulp-util": "~3.0.6",
"gulp-ng-annotate": "~1.1.0",
"gulp-replace": "~0.5.4",
"gulp-rename": "~1.2.2",
"gulp-rev": "~6.0.1",
"gulp-rev-replace": "~0.4.2",
"gulp-htmlmin": "~1.3.0",
"gulp-inject": "~3.0.0",
"gulp-protractor": "~2.1.0",
"gulp-sourcemaps": "~1.6.0",
"gulp-sass": "~2.0.4",
"gulp-angular-filesort": "~1.1.1",
"main-bower-files": "~2.9.0",
},
"engines": {
"node": ">=0.10.0"
},
"main": "gulpfile.js",
"author": "",
"license": "ISC",
"description": ""
}
Heroku的日志
2017-10-05T19:54:38.573601 + 00:00应用程式[web.1]:NPM ERR!退出状态134
2017-10-05T19:54:38.573414 + 00:00 app [web.1]:npm ERR! [email protected]开始:npm start
2017-10-05T19:54:38.573866 + 00:00 app [web.1]:npm ERR!
2017-10-05T19:54:38.574111 + 00:00 app [web.1]:npm ERR!在[email protected]启动脚本中失败。
2017-10-05T19:54:38.574295 + 00:00 app [web.1]:npm ERR!这可能不是npm的问题。上面可能还有其他日志记录输出。
2017-10-05T19:54:38.579163 + 00:00 app [web.1]:npm WARN本地package.json存在,但是node_modules缺失,是否意味着要安装? 2017-10-05T19:54:38.580016 + 00:00应用程式[web.1]:
答
你只需要devDependencies定义。
我认为你需要为你的应用程序定义一些常规依赖关系。
devDependencies通常只在开发和测试期间安装。
在生产中,您安装依赖项模块。