我创建了一个ember-cli heroku实例:
heroku create xxx-yyy-uuu --buildpack https://github.com/tonycoco/heroku-buildpack-ember-cli.git
并部署到它:
git push heroku
但它失败了:
remote: bower ember#^2.0.0 invalid-meta ember is missing "ignore" entry in bower.json [6/2258]
remote: bower ember#>=1.4 invalid-meta ember is missing "ignore" entry in bower.json
remote: bower ember#> 1.5.0-beta.3 invalid-meta ember is missing "ignore" entry in bower.json
remote: -----> Cleaning up node-gyp and npm artifacts
remote: -----> Building Ember CLI application production distribution
remote:
remote: Missing npm packages:
remote: Package: ember-cli-simple-auth-token
remote: * Specified: git://github.com/jpadilla/ember-cli-simple-auth-token.git
remote: * Installed: (not installed)
remote:
remote: Run `npm install` to install missing dependencies.
remote:
remote:
remote: ! Push rejected, failed to compile Ember CLI app
remote:
remote: Verifying deploy....
remote:
remote: ! Push rejected to xxx-yyy-uuu.
remote:
To https://git.heroku.com/xxx-yyy-uuu.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/xxx-yyy-uuu.git'
如何安装npm包?
我的package.json
是:
{
"name": "xxxyyyuuu",
"version": "0.0.0",
"description": "Small description for xxxyyyuuu goes here",
"private": true,
"directories": {
"doc": "doc",
"test": "tests"
},
"scripts": {
"build": "ember build",
"start": "ember server",
"test": "ember test"
},
"repository": "",
"engines": {
"node": ">= 0.10.0"
},
"author": "",
"license": "MIT",
"devDependencies": {
"broccoli-asset-rev": "^2.2.0",
"broccoli-funnel": "^1.0.1",
"broccoli-merge-trees": "^1.1.0",
"broccoli-stew": "^1.0.4",
"broccoli-unwatched-tree": "^0.1.1",
"ember-cli": "1.13.13",
"ember-cli-app-version": "^1.0.0",
"ember-cli-babel": "^5.1.5",
"ember-cli-dependency-checker": "^1.1.0",
"ember-cli-htmlbars": "^1.0.1",
"ember-cli-htmlbars-inline-precompile": "^0.3.1",
"ember-cli-ic-ajax": "0.2.4",
"ember-cli-inject-live-reload": "^1.3.1",
"ember-cli-qunit": "^1.0.4",
"ember-cli-release": "0.2.8",
"ember-cli-simple-auth-token": "git://github.com/jpadilla/ember-cli-simple-auth-token.git",
"ember-cli-sri": "^1.2.0",
"ember-cli-uglify": "^1.2.0",
"ember-data": "1.13.15",
"ember-disable-proxy-controllers": "^1.0.1",
"ember-export-application-global": "^1.0.4",
"ember-link-action": "0.0.33",
"ember-power-select": "0.7.2",
"ember-simple-auth": "1.0.1"
}
}
我使用发布到npm的ember-cli-simple-auth-token
because版本的完整网址太旧了。
答案 0 :(得分:1)
不知道为什么Heroku不允许package.json
中的完整网址,但@Bek指向了另一个deploy platform,这似乎更容易用于静态项目。
与Heroku相反,资产是在开发主机上构建的,这意味着如果您可以在本地构建项目,则可以部署:没有buildpack,没有不透明和复杂的配置。你没有像使用Heroku那样获得灵活性,但是对于简单的设置,这才有效。