Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing package.json during rebuild #247

Closed
ef4 opened this issue Aug 3, 2016 · 5 comments
Closed

Missing package.json during rebuild #247

ef4 opened this issue Aug 3, 2016 · 5 comments

Comments

@ef4
Copy link
Contributor

ef4 commented Aug 3, 2016

Using ember fastboot --watch --serve-assets with beta.8, the first build of my app is OK, the second build always fails because dist/package.json is missing and the npm install fails.

@jasonmit
Copy link
Contributor

jasonmit commented Aug 3, 2016

This is also related to #246 and I was able to reproduce in beta.4 as well before --watch landed.

/cc @danmcclain since we just discussed on slack

@josemarluedke
Copy link
Contributor

Hey, I'm running into this issue as well.

Here is my stack trace:


$ ember fastboot --serve-assets --watch
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
Installing FastBoot npm dependencies

Build successful - 9747ms.

Slowest Trees                                 | Total
----------------------------------------------+---------------------
JSHint templates- Mocha                       | 1114ms
SourceMapConcat: Concat: Vendor /assets/ve... | 978ms
SassCompiler                                  | 654ms
SassCompiler                                  | 648ms
JSHint templates- Mocha                       | 520ms

Slowest Trees (cumulative)                    | Total (avg)
----------------------------------------------+---------------------
Babel (100)                                   | 1948ms (19 ms)
JSHint templates- Mocha (2)                   | 1635ms (817 ms)
SassCompiler (2)                              | 1303ms (651 ms)
SourceMapConcat: Concat: Vendor /asset... (2) | 1293ms (646 ms)
AutoprefixerFilter (2)                        | 525ms (262 ms)

DEBUG: -------------------------------
DEBUG: Ember             : 2.6.1
DEBUG: Ember Data        : 2.7.0
DEBUG: Ember Simple Auth : 1.1.0
DEBUG: -------------------------------
Ember FastBoot running at http://[::]:3000
file changed routes/team.js

Build successful - 1325ms.



Slowest Trees (cumulative)                    | Total (avg)
----------------------------------------------+---------------------
Funnel (53)                                   | 180ms (3 ms)
Babel (100)                                   | 110ms (1 ms)
Funnel: Addon JS (90)                         | 76ms (0 ms)
SassCompiler (2)                              | 70ms (35 ms)

Installing FastBoot npm dependencies
There was an error trying to run your application in FastBoot.

This is usually caused by either your application code or an addon trying to access an API that isn't available in Node.js.
Based on the stack trace, it looks like the exception was generated in node_modules/fastboot/src/ember-app.js on line 245.
The exception is probably coming from your app. Look at this file and line number to determine what is triggering the exception.

The full stack trace is:

Couldn't find /Users/josemarluedke/Projects/Neighborly/demeter/main/dist/dev/package.json. You may need to update your version of ember-cli-fastboot.
Error: Couldn't find /Users/josemarluedke/Projects/Neighborly/demeter/main/dist/dev/package.json. You may need to update your version of ember-cli-fastboot.
    at EmberApp.readPackageJSON (/Users/josemarluedke/Projects/Neighborly/demeter/main/node_modules/fastboot/src/ember-app.js:245:13)
    at new EmberApp (/Users/josemarluedke/Projects/Neighborly/demeter/main/node_modules/fastboot/src/ember-app.js:32:23)
    at FastBoot._buildEmberApp (/Users/josemarluedke/Projects/Neighborly/demeter/main/node_modules/fastboot/src/index.js:102:17)
    at new FastBoot (/Users/josemarluedke/Projects/Neighborly/demeter/main/node_modules/fastboot/src/index.js:47:10)
    at fastbootExpressMiddleware (/Users/josemarluedke/Projects/Neighborly/demeter/main/node_modules/fastboot-express-middleware/index.js:24:16)
    at exec.then (/Users/josemarluedke/Projects/Neighborly/demeter/main/node_modules/ember-cli-fastboot/lib/tasks/fastboot-server.js:33:71)
    at lib$rsvp$$internal$$tryCatch (/Users/josemarluedke/Projects/Neighborly/demeter/main/node_modules/rsvp/dist/rsvp.js:1036:16)
    at lib$rsvp$$internal$$invokeCallback (/Users/josemarluedke/Projects/Neighborly/demeter/main/node_modules/rsvp/dist/rsvp.js:1048:17)
    at lib$rsvp$$internal$$publish (/Users/josemarluedke/Projects/Neighborly/demeter/main/node_modules/rsvp/dist/rsvp.js:1019:11)
    at lib$rsvp$asap$$flush (/Users/josemarluedke/Projects/Neighborly/demeter/main/node_modules/rsvp/dist/rsvp.js:1198:9)

@steveszc
Copy link

In case it's helpful, here's a repo that reproduces this issue on a fresh Ember-cli 2.7 app with ember-cli-fastboot@1.0.0-beta.8 installed. The issue does not appear to happen when beta.7 is installed. https://github.com/steveszc/reproduce-fastboot-serve-assets-issue

Seems like maybe the regression was introduced here: bfc9855

@billdami
Copy link

billdami commented Sep 1, 2016

I am running into this issue as well. Here's my console output/stack trace:

Installing FastBoot npm dependencies
There was an error trying to run your application in FastBoot.

This is usually caused by either your application code or an addon trying to access an API that isn't available in Node.js.
Based on the stack trace, it looks like the exception was generated in node_modules/fastboot/src/ember-app.js on line 245.
The exception is probably coming from your app. Look at this file and line number to determine what is triggering the exception.

The full stack trace is:

Couldn't find /Users/billdami/Development/daacs-web/daacs/dist/package.json. You may need to update your version of ember-cli-fastboot.
Error: Couldn't find /Users/billdami/Development/daacs-web/daacs/dist/package.json. You may need to update your version of ember-cli-fastboot.
    at EmberApp.readPackageJSON (/Users/billdami/Development/daacs-web/daacs/node_modules/fastboot/src/ember-app.js:245:13)
    at new EmberApp (/Users/billdami/Development/daacs-web/daacs/node_modules/fastboot/src/ember-app.js:32:23)
    at FastBoot._buildEmberApp (/Users/billdami/Development/daacs-web/daacs/node_modules/fastboot/src/index.js:102:17)
    at new FastBoot (/Users/billdami/Development/daacs-web/daacs/node_modules/fastboot/src/index.js:47:10)
    at fastbootExpressMiddleware (/Users/billdami/Development/daacs-web/daacs/node_modules/fastboot-express-middleware/index.js:24:16)
    at exec.then (/Users/billdami/Development/daacs-web/daacs/node_modules/ember-cli-fastboot/lib/tasks/fastboot-server.js:33:71)
    at lib$rsvp$$internal$$tryCatch (/Users/billdami/Development/daacs-web/daacs/node_modules/rsvp/dist/rsvp.js:493:16)
    at lib$rsvp$$internal$$invokeCallback (/Users/billdami/Development/daacs-web/daacs/node_modules/rsvp/dist/rsvp.js:505:17)
    at lib$rsvp$$internal$$publish (/Users/billdami/Development/daacs-web/daacs/node_modules/rsvp/dist/rsvp.js:476:11)
    at lib$rsvp$asap$$flush (/Users/billdami/Development/daacs-web/daacs/node_modules/rsvp/dist/rsvp.js:1198:9)

@tomdale
Copy link
Contributor

tomdale commented Sep 5, 2016

Sorry this is taking so long to fix, we've got some improvements to the overall way the build works that should address this but it's taking longer than I anticipated. Thanks for your patience! I will close this issue in favor of #246.

@tomdale tomdale closed this as completed Sep 5, 2016
pwfisher added a commit to pwfisher/ember-cli-fastboot that referenced this issue Oct 18, 2016
danmcclain added a commit that referenced this issue Oct 19, 2016
Write package.json when unchanged but file was deleted. Fixes #247
xg-wang pushed a commit to xg-wang/ember-cli-fastboot that referenced this issue Nov 16, 2020
Remove najax from default set of sandbox globals.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants