-
Notifications
You must be signed in to change notification settings - Fork 8
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
fs wheter not resolved or undefined #7
Comments
It's related to the use of serverMiddleware in nuxt.js. Isolating the backend removes this error. Nuxt tries to load apollo-server-express in the browser somehow but fs isn't available in browsers. |
I was wrong. The issue still remains. Any ideas? |
For anyone who may have the same problem. I used gql from |
Hi,
I'm using this package with nuxt (apollo-server-express) and experience the following issue:
If I don't set:
build: { analyze: false, extend: (config) => { config.node = { fs: 'empty' } } }
i get:
Module not found: Error: Can't resolve 'fs' in
setting it resolved the issue until updated all packages yesterday. Now the browser logs:
app.js:970 [nuxt] Error while initializing app TypeError: Class extends value undefined is not a constructor or null at Module.<anonymous> (core_data.8fb92f55.js:35632) at Module../node_modules/fs-capacitor/lib/index.mjs (core_data.8fb92f55.js:35816) at __webpack_require__ (runtime.js:787) at fn (runtime.js:150) at Module.<anonymous> (core_data.8fb92f55.js:41785) at Module../node_modules/graphql-upload/lib/processRequest.mjs (core_data.8fb92f55.js:42016) at __webpack_require__ (runtime.js:787) at fn (runtime.js:150) at Module../node_modules/graphql-upload/lib/index.mjs (core_data.8fb92f55.js:41754) at __webpack_require__ (runtime.js:787)
I know that your code is correct and that the error must be somewhat webpack / browser related. Maybe you have a hint for me. Otherwise I'll upate this issue as soon as I found an solution.
The text was updated successfully, but these errors were encountered: