Comments (8)
I believe this issue can be closed.
- If you are seeing this error message when using ember-cli-fastboot
ember serve
, make sure your fastboot dependency is up-to-date ember-fastboot/ember-cli-fastboot#711 (comment); - If this error pops up when deploying your app, make sure there's
node_modules
in thedist/
folder as mentioned at https://github.com/ember-fastboot/fastboot#build-your-app. - ember-data 3.9.1 may also have problem working with ember-fetch, try upgrade to newer versions.
If there's something missing here please reopen or create another issue.
from ember-fetch.
This happens to me when I resolve to fastboot 2.0.0
or above. Running Fastboot 1.2.1
works fine with ember-fetch 6.4.0
. Maybe that could be the culprit?
from ember-fetch.
I also stumbled into this. Even with the latest release.
This happens to me when I resolve to fastboot 2.0.0 or above. Running Fastboot 1.2.1 works fine with ember-fetch 6.4.0
Weird. It is just the opposite for me, I was able to fix it by forcing [email protected]
on my app server. (not trying this locally, but on the real staging server)
I dug into this, and I think the use of existsSync
is the culprit, which does not know anything about node's module resulution: https://github.com/ember-fastboot/fastboot/blob/v1.2.1/src/ember-app.js#L126
nodeModulesPath
is something like .../dist/abortcontroller-polyfill/dist/cjs-ponyfill
, and that file indeed does not exist physically, as the .js
file type is missing here. So it tries to require not from within the dist
path, and that fails.
In the latest version of fastboot
the resolve
package is used, which correctly understands that this is a valid module reference: https://github.com/ember-fastboot/fastboot/blob/master/src/ember-app.js#L139
from ember-fetch.
I can confirm this happens on ember-cli-fastboot
, not specific to your fork.
This happens when I do yarn link ember-cli-fastboot
on a ember app.
I set a debugger at the line before node does require
, then require.resolve('node-fetch')
will error when link, but works well if not link.
It could be yarn link issue or ember-cli-fastboot issue which I don't know. [email protected] containing ember-fastboot/fastboot#200 is a good to have but it doesn't help with the link issue.
[I] ➜ ember --version --verbose
ember-cli: 3.6.1
http_parser: 2.8.0
node: 11.2.0
v8: 7.0.276.38-node.11
uv: 1.23.2
zlib: 1.2.11
ares: 1.15.0
modules: 67
nghttp2: 1.34.0
napi: 3
openssl: 1.1.0i
icu: 62.1
unicode: 11.0
cldr: 33.1
tz: 2018e
os: darwin x64
[I] ➜ yarn --version
1.12.3
from ember-fetch.
I'm still getting this with [email protected] in fastboot.
Error: Cannot find module 'abortcontroller-polyfill/dist/cjs-ponyfill'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
at Function.Module._load (internal/modules/cjs/loader.js:508:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.require (node_modules/fastboot/src/ember-app.js:130:18)
at a.callback (dist/ember-fetch/fetch-fastboot-5e5d008c8b65b0ac116f7635d0c6c6b9.js:1:24)
at a.exports (dist/assets/vendor-4de0f4d6c6a261773e0e61365d28c09b.js:19:21)
at a._reify (dist/assets/vendor-4de0f4d6c6a261773e0e61365d28c09b.js:22:35)
at a.reify (dist/assets/vendor-4de0f4d6c6a261773e0e61365d28c09b.js:21:23)
at a.exports (dist/assets/vendor-4de0f4d6c6a261773e0e61365d28c09b.js:18:84)
from ember-fetch.
@xg-wang works for me
from ember-fetch.
I have found if you just install ember-fetch
on the encapsulating server this works without the need to install all packages in the dist directory
from ember-fetch.
I believe this issue can be closed.
- If you are seeing this error message when using ember-cli-fastboot
ember serve
, make sure your fastboot dependency is up-to-date ember-cli-fastboot with ember-fetch broken ember-fastboot/ember-cli-fastboot#711 (comment);- If this error pops up when deploying your app, make sure there's
node_modules
in thedist/
folder as mentioned at https://github.com/ember-fastboot/fastboot#build-your-app.- ember-data 3.9.1 may also have problem working with ember-fetch, try upgrade to newer versions.
If there's something missing here please reopen or create another issue.
Do you know how to do that on a heroku server?
from ember-fetch.
Related Issues (20)
- Version 6.7.2 onwards seems not to transpile to es5 (Caused IE11 Blank screen, with no console errors) HOT 2
- Could not find module `fetch` imported from `prog/instance-initializers/setup-fetch` HOT 2
- Operation outputFileSync is not allowed to use HOT 15
- Where are all the response headers? HOT 2
- Inconsistent Headers objects with preferNative HOT 1
- fetch is not defined - maybe your browser targets are not covering everything you need HOT 31
- v8.0.3 contains `yarn-error.log` file
- Ember 3.27+ issues deprecation for accessing `window.Ember` HOT 1
- Could not find module `rsvp` imported from `fetch` HOT 6
- Version 8.1.0 not released to NPM? HOT 1
- Migration from jquery.ajax $.ajaxSettings.traditional = true. How remove [] from params
- Dropping Node 10, older versions of Ember
- Archive this repo? HOT 16
- Deprecation warning for assign() from ember/polyfills
- Failed to execute 'fetch' on 'Window': Failed to read the 'signal' property from 'RequestInit': Failed to convert value to 'AbortSignal'.
- ember-polyfills.deprecate-assign deprication in Ember 4.4
- ember-fetch `input` type parameter is incorrect
- Upgrade package "node-fetch" to fix
- `Error: cannot find module rsvp imported from fetch`: Ember 4.12 + embroider-optimized scenario HOT 1
- Maintenance, V2, modern `fetch`, etc
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-fetch.