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

ember-cli-fastboot with ember-fetch broken #711

Closed
lucacorti opened this issue Jul 15, 2019 · 13 comments
Closed

ember-cli-fastboot with ember-fetch broken #711

lucacorti opened this issue Jul 15, 2019 · 13 comments

Comments

@lucacorti
Copy link
Contributor

Updating fastboot to 2.x broke ember-cli-fastboot when using ember-fetch.

Interestingly enough, this is apparently the same issue there was with fastboot-app-server with fastboot 1.x, fixed by upgrading to 2.x. (#686)

But in ember-cli-fastboot this happens with fastboot 2.x and doesn't with fastboot 1.x (ember-cli/ember-fetch/issues/184) 🤔

@bobisjan
Copy link
Contributor

Maybe related ember-fastboot/fastboot#221?

@J4RF
Copy link

J4RF commented Jul 16, 2019

Seems to be the same issue @bobisjan suggested. I'm getting this error after updating to 2.1.2:

Error: Cannot find module 'abortcontroller-polyfill/dist/cjs-ponyfill' from '/var/folders/b6/2_g8ffw90xdbvn557jpc2wzh0000gn/T/broccoli-62836UxZeLHsluFnH/out-334-broccoli_merge_trees'
at Function.module.exports [as sync] (/Users/jeff/Documents/projects/backstage-signup/frontend-app/node_modules/resolve/lib/sync.js:71:15)
at Object.require (/Users/jeff/Documents/projects/backstage-signup/frontend-app/node_modules/fastboot/src/ember-app.js:139:42)
at Module.callback (/var/folders/b6/2_g8ffw90xdbvn557jpc2wzh0000gn/T/broccoli-62836UxZeLHsluFnH/out-334-broccoli_merge_trees/ember-fetch/fetch-fastboot.js:6:42)
at Module.exports (/var/folders/b6/2_g8ffw90xdbvn557jpc2wzh0000gn/T/broccoli-62836UxZeLHsluFnH/out-334-broccoli_merge_trees/assets/vendor/loader/loader.js:106:1)
at requireModule (/var/folders/b6/2_g8ffw90xdbvn557jpc2wzh0000gn/T/broccoli-62836UxZeLHsluFnH/out-334-broccoli_merge_trees/assets/vendor/loader/loader.js:27:1)
at r (/var/folders/b6/2_g8ffw90xdbvn557jpc2wzh0000gn/T/broccoli-62836UxZeLHsluFnH/out-334-broccoli_merge_trees/assets/vendor/loader/loader.js:176:1)
at Module.callback (/var/folders/b6/2_g8ffw90xdbvn557jpc2wzh0000gn/T/broccoli-62836UxZeLHsluFnH/out-334-broccoli_merge_trees/assets/addon-tree-output/ember-data/-private.js:14246:1)
at Module.exports (/var/folders/b6/2_g8ffw90xdbvn557jpc2wzh0000gn/T/broccoli-62836UxZeLHsluFnH/out-334-broccoli_merge_trees/assets/vendor/loader/loader.js:106:1)
at Module._reify (/var/folders/b6/2_g8ffw90xdbvn557jpc2wzh0000gn/T/broccoli-62836UxZeLHsluFnH/out-334-broccoli_merge_trees/assets/vendor/loader/loader.js:143:1)
at Module.reify (/var/folders/b6/2_g8ffw90xdbvn557jpc2wzh0000gn/T/broccoli-62836UxZeLHsluFnH/out-334-broccoli_merge_trees/assets/vendor/loader/loader.js:130:1)

@allthesignals
Copy link
Contributor

ditto, seeing error about abortcontroller-polyfill/dist/cjs-ponyfill

@kiwiupover
Copy link
Member

@allthesignals would you do me a favor and delete your node_modules folder and package.lock.json/yarn.lock and then reinstall your node deps and let me know if you still have this issue.

@allthesignals
Copy link
Contributor

@kiwiupover sure, I did a fresh re-install and I still see the same error.

The first time I tried yarn after blowing out that stuff, I saw this:

$ yarn
yarn install v1.5.1
info No lockfile found.
[1/5] 🔍  Validating package.json...
[2/5] 🔍  Resolving packages...
warning ember-composable-helpers > ember-cli-babel > @babel/polyfill@7.4.4: 🚨 As of Babel 7.4.0, this
package has been deprecated in favor of directly
including core-js/stable (to polyfill ECMAScript
features) and regenerator-runtime/runtime
(needed to use transpiled generator functions):

  > import "core-js/stable";
  > import "regenerator-runtime/runtime";
warning ember-composable-helpers > ember-cli-babel > broccoli-babel-transpiler > @babel/polyfill@7.4.4: 🚨 As of Babel 7.4.0, this
package has been deprecated in favor of directly
including core-js/stable (to polyfill ECMAScript
features) and regenerator-runtime/runtime
(needed to use transpiled generator functions):

  > import "core-js/stable";
  > import "regenerator-runtime/runtime";
warning ember-concurrency > ember-maybe-import-regenerator > broccoli-funnel > exists-sync@0.0.4: Please replace with usage of fs.existsSync
warning fastboot-app-server > fs-promise@2.0.3: Use mz or fs-extra^3.0 with Promise Support
error An unexpected error occurred: "Couldn't find package \"@simple-dom/serializer@^1.4.0\" required by \"simple-dom@^1.4.0\" on the \"npm\" registry.".
info If you think this is a bug, please open a bug report with the information provided in "/Users/mgardner/Source/labs-zola/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

The second yarn was a successful install 🤷‍♂️.

@allthesignals
Copy link
Contributor

It's weird, when I revert back to 1.3.1, using fastboot-app-server, I only see the error on my production server:

2019-07-16T19:29:34.710538+00:00 app[web.1]: Error: Cannot find module 'abortcontroller-polyfill/dist/cjs-ponyfill' from '/app/dist'
2019-07-16T19:29:34.710541+00:00 app[web.1]:     at Function.module.exports [as sync] (/app/node_modules/resolve/lib/sync.js:71:15)
2019-07-16T19:29:34.710544+00:00 app[web.1]:     at Object.require (/app/node_modules/fastboot-app-server/node_modules/fastboot/src/ember-app.js:139:42)
2019-07-16T19:29:34.710547+00:00 app[web.1]:     at Module.callback (/app/dist/ember-fetch/fetch-fastboot.js:6:42)
2019-07-16T19:29:34.710549+00:00 app[web.1]:     at Module.exports (/app/dist/assets/vendor/loader/loader.js:106:1)
2019-07-16T19:29:34.710551+00:00 app[web.1]:     at requireModule (/app/dist/assets/vendor/loader/loader.js:27:1)
2019-07-16T19:29:34.710555+00:00 app[web.1]:     at r (/app/dist/assets/vendor/loader/loader.js:176:1)
2019-07-16T19:29:34.710557+00:00 app[web.1]:     at Module.callback (/app/dist/assets/addon-tree-output/@ember-data/adapter/-private.js:144:1)
2019-07-16T19:29:34.710559+00:00 app[web.1]:     at Module.exports (/app/dist/assets/vendor/loader/loader.js:106:1)
2019-07-16T19:29:34.710561+00:00 app[web.1]:     at Module._reify (/app/dist/assets/vendor/loader/loader.js:143:1)
2019-07-16T19:29:34.710563+00:00 app[web.1]:     at Module.reify (/app/dist/assets/vendor/loader/loader.js:130:1)

@jkubaile
Copy link

I am also struggling with this error. I can reproduce it by doing:

  • ember new foobar-> "ember s" shows welcome page in the browser
  • ember install ember-cli-fastboot -> "ember s" shows welcome page in the browser
  • ember install ember-fetch -> "ember s" shows error in the browser

(Based on the current ember-cli 3.11.0)

@st-h
Copy link

st-h commented Jul 19, 2019

I tried to see if any commits between 2.1.1 and 2.1.2 works by adding them directly to package.json, however even the first commits after the 2.1.1 release produced strange behaviour. I am seeing the same error starting version 2.1.2:

Error: Cannot find module 'abortcontroller-polyfill/dist/cjs-ponyfill' from '/var/folders/yt/kw3pd9l52sd9bbpjrlpm47rm0000gn/T/broccoli-7018TPFGphP3rI7b/out-649-broccoli_persistent_filter_autoprefixer_filter'

2.1.1 is the last release I am able to use without seeing that error

@hedgerh
Copy link

hedgerh commented Jul 22, 2019

Experiencing this after bumping from 2.1.1 to 2.1.3

@josemarluedke
Copy link
Contributor

Confirm! I'm also getting this after bumping from 2.1.1 to 2.1.3.

@xg-wang
Copy link
Member

xg-wang commented Jul 22, 2019

In commit 21a5f3f ember-cli-fastboot updated fastboot to ^2.0.0 and released as 2.1.2.
Fastboot 2.0.0 contains an effective breaking change ember-fastboot/fastboot#200, it requires consumer to remove usage of relying on node_modules in working directory rather than build output directory.
Then ember-cli-fastboot bumped fastboot without making changes accordingly. @bobisjan is discussing proper fixes in ember-fastboot/fastboot#221.

@xg-wang
Copy link
Member

xg-wang commented Aug 6, 2019

The issue should have been fixed by yarn upgrade fastboot to get fastboot v2.0.2.

@rwjblue
Copy link
Member

rwjblue commented Aug 6, 2019

Thank you @xg-wang / @kratiahuja, closing this for now but happy to reopen if we've missed something.

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