You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to deploy a Nuxt app to cloudflare pages. The app builds and runs fine locally, but the deployment to cloudflare pages fails. I'm using the Nuxt Apollo module, but I think the error might not be specific to the module, but has something to do with how Nuxt deploys on Cloudflare Pages. When deploying to Cloudflare pages I get the following error:
20:41:08.091 | [success] Server built in 1589ms
-- | --
20:41:08.108 | [success] [nitro] Generated public dist
20:41:08.168 | [info] [nitro] Building Nitro Server (preset: `cloudflare-pages`)
20:41:12.418 | (inject plugin) rollup-plugin-inject: failed to parse /opt/buildhome/repo/node_modules/graphql/jsutils/instanceOf.mjs. Consider restricting the plugin to particular files via options.include
20:41:12.421 | [error] [nitro] RollupError: Unexpected token (Note that you need plugins to import files that are not JavaScript)
20:41:12.422 |
20:41:12.422 |
20:41:12.422 | 10: /* c8 ignore next 6 */
20:41:12.422 | 11: // FIXME: https://github.com/graphql/graphql-js/issues/2317
20:41:12.423 | 12: globalThis.process && globalThis.process.env.NODE_ENV === 'production'
20:41:12.423 | ^
20:41:12.423 | 13: ? function instanceOf(value, constructor) {
20:41:12.423 | 14: return value instanceof constructor;
20:41:12.424 | [error] Unexpected token (Note that you need plugins to import files that are not JavaScript)
20:41:12.425 | at error (node_modules/rollup/dist/es/shared/node-entry.js:2245:30)
20:41:12.425 | at Module.error (node_modules/rollup/dist/es/shared/node-entry.js:13572:16)
20:41:12.425 | at Module.tryParse (node_modules/rollup/dist/es/shared/node-entry.js:14298:25)
20:41:12.425 | at Module.setSource (node_modules/rollup/dist/es/shared/node-entry.js:13899:39)
20:41:12.425 | at ModuleLoader.addModuleSource (node_modules/rollup/dist/es/shared/node-entry.js:24422:20)
20:41:12.472 | Failed: Error while executing user command. Exited with error code: 1
20:41:12.482 | Failed: build command exited with code: 1
20:41:13.591 | Failed: error occurred while running build command
This implies the build works fine, but rollup-plugin-inject fails to parse the graphql module. I'm not sure how to solve this, I searched through issues here in nuxt, and also over at nuxt apollo, but I don't know how to go about fixing this. Any help would be appreciated!
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered:
There are multiple issues in graphql/graphql-js related to this graphql/graphql-js#3928, but it seems there is a fix lined up in this PR graphql/graphql-js#3927. I guess the next release of graphql-js will fix this.
Forwarded from downstream issue:
Environment
Darwin
v18.16.1
3.6.0
2.5.1
npm@9.5.1
vite
devtools
,modules
,apollo
@nuxtjs/apollo@5.0.0-alpha.6
-
Reproduction
https://github.com/floatingpixels/nuxt-apollo.git
Describe the bug
I'm trying to deploy a Nuxt app to cloudflare pages. The app builds and runs fine locally, but the deployment to cloudflare pages fails. I'm using the Nuxt Apollo module, but I think the error might not be specific to the module, but has something to do with how Nuxt deploys on Cloudflare Pages. When deploying to Cloudflare pages I get the following error:
This implies the build works fine, but rollup-plugin-inject fails to parse the graphql module. I'm not sure how to solve this, I searched through issues here in nuxt, and also over at nuxt apollo, but I don't know how to go about fixing this. Any help would be appreciated!
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: