Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/30.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 将angular 2应用程序部署到heroku_Node.js_Angular_Heroku_Deployment - Fatal编程技术网

Node.js 将angular 2应用程序部署到heroku

Node.js 将angular 2应用程序部署到heroku,node.js,angular,heroku,deployment,Node.js,Angular,Heroku,Deployment,我刚刚基于此模板完成Angular 2应用程序的构建,我想将该项目部署到heroku或其他主机上,我是Deployment I的新手,我遵循了heroku官方文档中的教程。 我有一些错误,这是日志 remote: [2/4] Fetching packages... remote: warning fsevents@1.1.1: The platform "linux" is incompatible with this module. remote:

我刚刚基于此模板完成Angular 2应用程序的构建,我想将该项目部署到heroku或其他主机上,我是Deployment I的新手,我遵循了heroku官方文档中的教程。 我有一些错误,这是日志

remote:        [2/4] Fetching packages...
remote:        warning fsevents@1.1.1: The platform "linux" is incompatible with this module.
remote:        info "fsevents@1.1.1" is an optional dependency and failed compatibility check. Excluding it from installation.
remote:        [3/4] Linking dependencies...
remote:        warning "@angular/platform-server@4.0.1" has unmet peer dependency "@angular/animations@4.0.1".
remote:        warning "ng2-ckeditor@1.1.6" has incorrect peer dependency "@angular/core@^2.1.0".
remote:        warning "ng2-ckeditor@1.1.6" has incorrect peer dependency "@angular/forms@^2.1.0".
remote:        warning "ng2-ckeditor@1.1.6" has incorrect peer dependency "@angular/common@^2.1.0".
remote:        warning "ngc-webpack@1.2.0" has incorrect peer dependency "@angular/compiler-cli@^2.4.1".
remote:        warning "angular2-google-maps@0.17.0" has incorrect peer dependency "@angular/common@^2.3.1".
remote:        warning "angular2-google-maps@0.17.0" has incorrect peer dependency "@angular/core@^2.3.1".
remote:        [4/4] Building fresh packages...
remote:        $ npm run clean:dist && webpack --config config/webpack.prod.js --progress --profile --colors --display-error-details --display-cached --bail
remote:
remote:        > ng2-admin@0.9.0 clean:dist /tmp/build_356acd39b0070f4934ca257226717bf9
remote:        > npm run rimraf -- dist
remote:
remote:
remote:        > ng2-admin@0.9.0 rimraf /tmp/build_356acd39b0070f4934ca257226717bf9
remote:        > rimraf "dist"
remote:
remote:        sh: 1: rimraf: not found
remote:
remote:        npm ERR! Linux 3.13.0-112-generic
remote:        npm ERR! argv "/tmp/build_356acd39b0070f4934ca257226717bf9/.heroku/node/bin/node" "/tmp/build_356acd39b0070f4934ca257226717bf9/.heroku/node/bin/npm" "run" "rimraf" "--" "dist"
remote:        npm ERR! node v6.11.0
remote:        npm ERR! npm  v3.10.10
remote:        npm ERR! file sh
remote:        npm ERR! code ELIFECYCLE
remote:        npm ERR! errno ENOENT
remote:        npm ERR! syscall spawn
remote:        npm ERR! ng2-admin@0.9.0 rimraf: `rimraf "dist"`
remote:        npm ERR! spawn ENOENT
remote:        npm ERR!
remote:        npm ERR! Failed at the ng2-admin@0.9.0 rimraf script 'rimraf "dist"'.
remote:        npm ERR! Make sure you have the latest version of node.js and npm installed.
remote:        npm ERR! If you do, this is most likely a problem with the ng2-admin package,
remote:        npm ERR! not with npm itself.
remote:        npm ERR! Tell the author that this fails on your system:
remote:        npm ERR!     rimraf "dist"
remote:        npm ERR! You can get information on how to open an issue for this project with:
remote:        npm ERR!     npm bugs ng2-admin
remote:        npm ERR! Or if that isn't available, you can get their info via:
remote:        npm ERR!     npm owner ls ng2-admin
remote:        npm ERR! There is likely additional logging output above.
remote:
remote:        npm ERR! Please include the following file with any support request:
remote:        npm ERR!     /tmp/build_356acd39b0070f4934ca257226717bf9/npm-debug.log
remote:
remote:        npm ERR! Linux 3.13.0-112-generic
remote:        npm ERR! argv "/tmp/build_356acd39b0070f4934ca257226717bf9/.heroku/node/bin/node" "/tmp/build_356acd39b0070f4934ca257226717bf9/.heroku/node/bin/npm" "run" "clean:dist"
remote:        npm ERR! node v6.11.0
remote:        npm ERR! npm  v3.10.10
remote:        npm ERR! code ELIFECYCLE
remote:        npm ERR! ng2-admin@0.9.0 clean:dist: `npm run rimraf -- dist`
remote:        npm ERR! Exit status 1
remote:        npm ERR!
remote:        npm ERR! Failed at the ng2-admin@0.9.0 clean:dist script 'npm run rimraf -- dist'.
remote:        npm ERR! Make sure you have the latest version of node.js and npm installed.
remote:        npm ERR! If you do, this is most likely a problem with the ng2-admin package,
remote:        npm ERR! not with npm itself.
remote:        npm ERR! Tell the author that this fails on your system:
remote:        npm ERR!     npm run rimraf -- dist
remote:        npm ERR! You can get information on how to open an issue for this project with:
remote:        npm ERR!     npm bugs ng2-admin
remote:        npm ERR! Or if that isn't available, you can get their info via:
remote:        npm ERR!     npm owner ls ng2-admin
remote:        npm ERR! There is likely additional logging output above.
remote:
remote:        npm ERR! Please include the following file with any support request:
remote:        npm ERR!     /tmp/build_356acd39b0070f4934ca257226717bf9/npm-debug.log
remote:        error Command failed with exit code 1.
remote:        info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
remote:
remote: -----> Build failed
remote:
remote:        We're sorry this build is failing! You can troubleshoot common issues here:
remote:        https://devcenter.heroku.com/articles/troubleshooting-node-deploys
remote:
remote:        Some possible problems:
remote:
remote:        - node_modules checked into source control
remote:        https://blog.heroku.com/node-habits-2016#9-only-git-the-important-bits
remote:
remote:        - Dangerous semver range (>) in engines.node
remote:        https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version
remote:
remote:        - This project was built with yarn, which is new and under development. Some projects can still be built more reliably with npm
remote:        https://devcenter.heroku.com/articles/nodejs-support#build-behavior
remote:
remote:        Love,
remote:        Heroku
remote:
remote:  !     Push rejected, failed to compile Node.js app.
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !       Push rejected to testngadmin.
Package.json

{
  "name": "ng2-admin",
  "version": "1.0.0",
  "description": "Angular and Bootstrap 4 Admin Template.",
  "author": "Akveo <contact@akveo.com>",
  "homepage": "http://akveo.github.io/ng2-admin/",
  "repository": {
    "type": "git",
    "url": "https://github.com/akveo/ng2-admin.git"
  },
  "bugs": {
    "url": "https://github.com/akveo/ng2-admin/issues"
  },
  "license": "MIT",
  "scripts": {
    "ng": "ng",
    "rimraf": "rimraf",
    "changelog": "standard-changelog",
    "start": "ng serve",
    "start:hmr": "ng serve --hmr",
    "start:aot": "ng serve --aot",
    "start:prod": "ng serve --prod",
    "start:prod:aot": "ng serve --prod --aot",
    "build": "npm run clean:dist && ng build",
    "build:prod": "npm run build -- --prod",
    "build:prod:aot": "npm run build:prod -- --aot",
    "build:ci": "npm run build:prod && npm run build:prod:aot",
    "build:demo": "npm run build:prod:aot -- --base-href \"http://akveo.com/ng2-admin/\"",
    "test": "ng test -sr",
    "test:coverage": "npm run clean:coverage && ng test -sr -cc",
    "lint": "ng lint",
    "lint:styles": "stylelint ./src/app/**/*.scss",
    "lint:ci": "npm run lint && npm run lint:styles",
    "pree2e": "webdriver-manager update --standalone false --gecko false",
    "e2e": "ng e2e",
    "clean:dist": "npm run rimraf -- dist",
    "clean:coverage": "npm run rimraf -- coverage",
    "docs:deploy": "wintersmith build -C docs && gh-pages -d docs/build",
    "docs:serve": "wintersmith preview -C docs"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "4.1.3",
    "@angular/common": "4.1.3",
    "@angular/compiler": "4.1.3",
    "@angular/core": "4.1.3",
    "@angular/forms": "4.1.3",
    "@angular/http": "4.1.3",
    "@angular/platform-browser": "4.1.3",
    "@angular/platform-browser-dynamic": "4.1.3",
    "@angular/platform-server": "4.1.3",
    "@angular/router": "4.1.3",
    "@ng-bootstrap/ng-bootstrap": "1.0.0-alpha.26",
    "@ngx-translate/core": "6.0.1",
    "@ngx-translate/http-loader": "0.0.3",
    "amcharts3": "github:amcharts/amcharts3",
    "ammap3": "github:amcharts/ammap3",
    "angular2-datatable": "0.6.0",
    "animate.css": "3.5.2",
    "bootstrap": "4.0.0-alpha.6",
    "chart.js": "1.1.1",
    "chartist": "0.10.1",
    "chroma-js": "1.3.3",
    "ckeditor": "4.6.2",
    "core-js": "2.4.1",
    "easy-pie-chart": "2.1.7",
    "font-awesome": "4.7.0",
    "fullcalendar": "3.3.1",
    "google-maps": "3.2.1",
    "ionicons": "2.0.1",
    "jquery": "3.2.1",
    "jquery-slimscroll": "1.3.8",
    "leaflet": "0.7.7",
    "leaflet-map": "0.2.1",
    "lodash": "4.17.4",
    "ng2-ckeditor": "1.1.6",
    "ng2-completer": "1.3.1",
    "ng2-handsontable": "0.48.0",
    "ng2-slim-loading-bar": "4.0.0",
    "ng2-smart-table": "1.0.3",
    "ng2-tree": "2.0.0-alpha.5",
    "ngx-uploader": "2.2.5",
    "normalize.css": "6.0.0",
    "roboto-fontface": "0.7.0",
    "rxjs": "5.4.0",
    "zone.js": "0.8.11"
  },
  "devDependencies": {
    "@angular/cli": "1.0.4",
    "@angular/compiler-cli": "4.1.3",
    "@types/fullcalendar": "2.7.40",
    "@types/jasmine": "2.5.38",
    "@types/jquery": "2.0.41",
    "@types/jquery.slimscroll": "1.3.30",
    "@types/lodash": "4.14.61",
    "@types/node": "6.0.69",
    "codelyzer": "3.0.1",
    "gh-pages": "0.12.0",
    "jasmine-core": "2.5.2",
    "jasmine-spec-reporter": "3.2.0",
    "karma": "1.4.1",
    "karma-chrome-launcher": "2.0.0",
    "karma-cli": "1.0.1",
    "karma-coverage-istanbul-reporter": "0.2.0",
    "karma-jasmine": "1.1.0",
    "karma-jasmine-html-reporter": "0.2.2",
    "npm-run-all": "4.0.2",
    "protractor": "5.1.0",
    "rimraf": "2.6.1",
    "standard-changelog": "1.0.1",
    "stylelint": "7.10.1",
    "ts-node": "2.1.2",
    "tslint": "5.2.0",
    "tslint-eslint-rules": "4.0.0",
    "tslint-language-service": "0.9.6",
    "typescript": "2.3.2",
    "typogr": "0.6.6",
    "underscore": "1.8.3",
    "wintersmith": "2.2.5",
    "wintersmith-sassy": "1.1.0"
  }
}
{
“名称”:“ng2管理员”,
“版本”:“1.0.0”,
“说明”:“Angular and Bootstrap 4管理模板”,
“作者”:“Akveo”,
“主页”:http://akveo.github.io/ng2-admin/",
“存储库”:{
“类型”:“git”,
“url”:”https://github.com/akveo/ng2-admin.git"
},
“臭虫”:{
“url”:”https://github.com/akveo/ng2-admin/issues"
},
“许可证”:“麻省理工学院”,
“脚本”:{
“ng”:“ng”,
“rimraf”:“rimraf”,
“变更日志”:“标准变更日志”,
“开始”:“ng发球”,
“开始:hmr”:“ng发球——hmr”,
“开始:aot”:“ng serve--aot”,
“开始:产品”:“ng serve--prod”,
“开始:产品:aot”:“ng serve--prod--aot”,
“构建”:“npm运行清理:dist&ng构建”,
“build:prod”:“npm运行build--prod”,
“build:prod:aot”:“npm运行build:prod--aot”,
“生成:ci”:“npm运行生成:产品和npm运行生成:产品:aot”,
“构建:演示”:“npm运行构建:产品:aot--base href\”http://akveo.com/ng2-admin/\"",
“测试”:“ng测试-sr”,
“测试:覆盖率”:“npm运行清理:覆盖率和ng测试-sr-cc”,
“皮棉”:“ng皮棉”,
“lint:styles”:“stylelint./src/app/***.scss”,
“lint:ci”:“npm运行lint&&npm运行lint:style”,
“pree2e”:“webdriver管理器更新--独立错误--gecko错误”,
“e2e”:“ng e2e”,
“清洁:地区”:“npm运行rimraf——地区”,
“清洁:覆盖范围”:“npm运行rimraf——覆盖范围”,
“文档:部署”:“wintersmith构建-C文档和gh页面-d文档/构建”,
“文档:服务”:“wintersmith预览-C文档”
},
“私人”:没错,
“依赖项”:{
“@angular/animations”:“4.1.3”,
“@angular/common”:“4.1.3”,
“@angular/compiler”:“4.1.3”,
“@angular/core”:“4.1.3”,
“@angular/forms”:“4.1.3”,
“@angular/http”:“4.1.3”,
“@角度/平台浏览器”:“4.1.3”,
“@angular/platform browser dynamic”:“4.1.3”,
“@angular/platform服务器”:“4.1.3”,
“@angular/router”:“4.1.3”,
“@ng bootstrap/ng bootstrap”:“1.0.0-alpha.26”,
“@ngx translate/core”:“6.0.1”,
“@ngx翻译/http加载程序”:“0.0.3”,
“amcharts3”:“github:amcharts/amcharts3”,
“ammap3”:“github:amcharts/ammap3”,
“angular2数据表”:“0.6.0”,
“animate.css”:“3.5.2”,
“引导”:“4.0.0-alpha.6”,
“chart.js”:“1.1.1”,
“图表专家”:“0.10.1”,
“chroma js”:“1.3.3”,
“ckeditor”:“4.6.2”,
“核心js”:“2.4.1”,
“简易饼图”:“2.1.7”,
“字体真棒”:“4.7.0”,
“完整日历”:“3.3.1”,
“谷歌地图”:“3.2.1”,
“ionicons”:“2.0.1”,
“jquery”:“3.2.1”,
“jquery slimscroll”:“1.3.8”,
“传单”:“0.7.7”,
“传单地图”:“0.2.1”,
“lodash”:“4.17.4”,
“ng2 ckeditor”:“1.1.6”,
“ng2完成者”:“1.3.1”,
“ng2可手持设备”:“0.48.0”,
“ng2细长加载杆”:“4.0.0”,
“ng2智能桌”:“1.0.3”,
“ng2树”:“2.0.0-alpha.5”,
“ngx上传器”:“2.2.5”,
“normalize.css”:“6.0.0”,
“roboto fontface”:“0.7.0”,
“rxjs”:“5.4.0”,
“zone.js”:“0.8.11”
},
“依赖性”:{
“@angular/cli”:“1.0.4”,
“@angular/compiler cli”:“4.1.3”,
“@types/fullcalendar”:“2.7.40”,
“@types/jasmine”:“2.5.38”,
“@types/jquery”:“2.0.41”,
“@types/jquery.slimscroll”:“1.3.30”,
“@types/lodash”:“4.14.61”,
“@types/node”:“6.0.69”,
“codelyzer”:“3.0.1”,
“gh页面”:“0.12.0”,
“茉莉花芯”:“2.5.2”,
“jasmine spec reporter”:“3.2.0”,
“因果报应”:“1.4.1”,
“卡玛铬发射器”:“2.0.0”,
“karma cli”:“1.0.1”,
“因果报应报道伊斯坦布尔记者”:“0.2.0”,
“噶玛茉莉”:“1.1.0”,
“karma jasmine html reporter”:“0.2.2”,
“npm运行全部”:“4.0.2”,
“量角器”:“5.1.0”,
“rimraf”:“2.6.1”,
“标准变更日志”:“1.0.1”,
“stylelint”:“7.10.1”,
“ts节点”:“2.1.2”,
“tslint”:“5.2.0”,
“tslint eslint规则”:“4.0.0”,
“tslint语言服务”:“0.9.6”,
“类型脚本”:“2.3.2”,
“打字错误”:“0.6.6”,
“下划线”:“1.8.3”,
“温特史密斯”:“2.2.5”,
“温特史密斯萨西”:“1.1.0”
}
}

somoene能帮上忙吗?

添加您的package.json文件再次检查刚才添加的内容您解决了这个问题吗?我也有!是的,请检查我的答案