[英]NodeJS on Heroku: Push rejected, failed to compile Node.js app
當我運行gulp serve
時,我有一個AngularJS應用程序,可以在localhost:3000
完美運行。 我試圖將其推送到Heroku,但出現這些錯誤。 如在其他文章中node_modules/
,我的.gitignore
有node_modules/
,但是即使運行npm cache clear
和npm install
之后,錯誤仍然存在。 如果我運行bower install --config.interactive=false
得到空白輸出。
-----> 日志文件
PACKAGE.JSON
{
"name": "mymodule",
"version": "0.0.5",
"dependencies": {
"express": "^4.13.3",
"bower": "1.6.5",
"gulp-connect": "~2.0.6",
"gzippo": "^0.2.0"
},
"scripts": {
"test": "gulp test",
"start": "node node_modules/gulp/bin/gulp serveprod",
"postinstall": "./node_modules/bower/bin/bower install --config.interactive=false"
},
"devDependencies": {
"gulp": "~3.9.0",
"gulp-autoprefixer": "~2.3.1",
"gulp-angular-templatecache": "~1.6.0",
"del": "~1.2.0",
"lodash": "~3.9.3",
"gulp-csso": "~1.0.0",
"gulp-filter": "~2.0.2",
"gulp-flatten": "~0.0.4",
"gulp-jshint": "~1.11.0",
"gulp-load-plugins": "~0.10.0",
"gulp-size": "~1.2.1",
"gulp-uglify": "~1.2.0",
"gulp-useref": "~1.2.0",
"gulp-util": "~3.0.5",
"gulp-ng-annotate": "~1.0.0",
"gulp-replace": "~0.5.3",
"gulp-rename": "~1.2.2",
"gulp-rev": "~5.0.0",
"gulp-rev-replace": "~0.4.2",
"gulp-minify-html": "~1.0.3",
"gulp-inject": "~1.3.1",
"gulp-protractor": "~1.0.0",
"gulp-sourcemaps": "~1.5.2",
"gulp-sass": "~2.0.1",
"gulp-angular-filesort": "~1.1.1",
"main-bower-files": "~2.8.0",
"merge-stream": "~0.1.7",
"jshint-stylish": "~2.0.0",
"wiredep": "~2.2.2",
"karma": "~0.12.36",
"karma-jasmine": "~0.3.5",
"karma-phantomjs-launcher": "~0.2.0",
"karma-angular-filesort": "~0.1.0",
"karma-ng-html2js-preprocessor": "~0.1.2",
"concat-stream": "~1.5.0",
"require-dir": "~0.3.0",
"browser-sync": "~2.7.12",
"browser-sync-spa": "~1.0.2",
"http-proxy-middleware": "~0.0.5",
"chalk": "~1.0.0",
"uglify-save-license": "~0.4.1",
"wrench": "~1.5.8"
},
"engines": {
"node": ">=0.10.0"
}
}
您可能會遇到以下打開的npm問題:
https://github.com/npm/npm/issues/9633
該錯誤僅在存在node_modules
時發生,因此您可以通過禁用該目錄的緩存來解決:
$ heroku config:set NODE_MODULES_CACHE=false
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.