heroku / heroku-buildpack-ember-cli-deploy Goto Github PK
View Code? Open in Web Editor NEW**Deprecated** Heroku Buildpack built around ember-cli-deploy and the static buildpack
**Deprecated** Heroku Buildpack built around ember-cli-deploy and the static buildpack
ember-cli's in-repo-addons are a useful way to isolate or extract code, especially in a monolith repo.
To properly support in-repo-addons, this buildpack would need to parse the package.json
file, look for the ember-addon.paths
key, and for each path, would need to cd into that path and yarn install
(or npm install
if there's a package-lock.json).
I'm getting the following error:
-----> Building ember assets
The specified command deploy is invalid. For available options, see `ember help`.
remote: Error running: ember deploy production 2>&1
...
I'm using:
#engines
"node": "6.4.0",
"npm": "3.10.7",
"ember-cli": "2.8.0"
#deploy
"ember-cli-deploy": "1.0.0-beta.1"
"ember-cli-deploy-build": "0.1.1"
"ember-cli-deploy-gzip": "0.2.3"
"ember-cli-deploy-revision-data": "0.3.0"
"ember-cli-fastboot": "1.0.0-beta.9"
Not sure what is causing it as, as ember build
and ember fastboot --serve-assets
and ember deploy production
both work locally.
I'm using the meta emberjs buildpack that relies on this one, and running into an issue with node_modules not being present at Heroku.
In addition to the devDependencies necessary for building my ember app, I have one production dependency (rollbar, the error reporter) that I'm using when running the fastboot app at Heroku.
My Procfile runs a node script to launch the app:
# Procfile
web: node serve.js
// serve.js
const FastBootAppServer = require('fastboot-app-server');
const Rollbar = require('rollbar');
let rollbar;
if (process.env.ROLLBAR_ACCESS_TOKEN) {
rollbar = new Rollbar(process.env.ROLLBAR_ACCESS_TOKEN);
}
let server = new FastBootAppServer({
distPath: 'dist',
gzip: true, // Optional - Enables gzip compression.
host: '0.0.0.0', // Optional - Sets the host the server listens on.
afterMiddleware(app) {
if (rollbar) {
app.use(rollbar.errorHandler());
}
}
});
server.start();
When I attempt to push this to Heroku the build succeeds but running the app fails because it cannot find the module "rollbar".
I'm also using yarn (and a committed yarn.lock
) file with this project, which turns out to be the source of my issue.
I believe this is the sequence of events that happens when pushing to heroku:
false
yarn.lock
installs node modules using yarn (I'm not sure if the NPM_CONFIG_PRODUCTION:false
is still set here and if it is required for the yarn install
to work โ either way, the yarn install does work and the devDependencies are installed at this point)npm install fastboot-cli
) โ I'm not sure the value of NPM_CONFIG_PRODUCTION
at this point, but I believe that the result of that npm install is some of the deps installed by yarn earlier are now removed. The Heroku output contains some lines like this:remote: npm notice created a lockfile as package-lock.json. You should commit this file.
remote: + [email protected]
remote: added 8 packages, removed 1151 packages and updated 123 packages in 15.857s
After this, I can use heroku run bash
to get to a shell and verify that node_modules/rollbar
is no longer present (and my app crashes when it tries to start due to the require('rollbar')
failing.
There are two successful workarounds I've attempted:
I think that if this code were changed to use yarn
when present, that may solve this problem:
Is it possible to use this buildpack to serve the app via fastboot from Heroku, but upload and serve the assets from S3 (Cloudfront, really)?
I have a small Ember application that I want to deploy to Dokku.
.buildpacks:
https://github.com/heroku/heroku-buildpack-nodejs.git
https://github.com/heroku/heroku-buildpack-ember-cli-deploy.git
During the deployment, I get this error:
[4/4] Building fresh packages...
warning Ignored scripts due to flag.
Done in 16.36s.
-----> Build succeeded!
! Unmet dependencies don't fail yarn install but may cause runtime issues
https://github.com/npm/npm/issues/7494
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-ember-cli-deploy.git
remote: /tmp/buildpack1DnQW/bin/detect: line 5: /tmp/buildpack1DnQW/vendor/buildpack: No such file or directory
Could you please help me solve this problem?
Identical problem for: heroku/heroku-buildpack-emberjs#51
Currently we've got ember deploy production
or ember build --environment production
hard-coded here: https://github.com/heroku/heroku-buildpack-ember-cli-deploy/blob/master/buildpack/mrblib/buildpack/commands/compile.rb#L39-L43
I've got a client who primarily needs to be building production apps, but has some cases where we need the flexibility to build a staging app as well. In the older tonycoco build pack they support an EMBER_ENV
environment variable that allows that to be toggled (see https://github.com/tonycoco/heroku-buildpack-ember-cli#environment)
Any chance we'd be able to do something similar here?
When using the plugin, we get a fatal error during the ember-cli-deploy build.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.