Open byunginhb opened 1 year ago
We are having the same issue when running @nuxtjs/apollo@5.0.0-alpha.6
and nitro preset: node-server
, however it works fine with the azure
preset.
[nuxt] [request error] [unhandled] [500] Cannot find package 'C:\dev\ASD\ASDConnected\src\ASD.Portal\.output\server\node_modules\graphql\' imported from C:\dev\ASD\ASDConnected\src\ASD.Portal\.output\server\chunks\app\server.mjs
at new NodeError (node:internal/errors:387:5)
at legacyMainResolve (node:internal/modules/esm/resolve:242:9)
at packageResolve (node:internal/modules/esm/resolve:839:14)
at moduleResolve (node:internal/modules/esm/resolve:901:20)
at defaultResolve (node:internal/modules/esm/resolve:1115:11)
at nextResolve (node:internal/modules/esm/loader:163:28)
at ESMLoader.resolve (node:internal/modules/esm/loader:837:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:76:40)
at link (node:internal/modules/esm/module_job:75:36)
Environment
Windows_NT
v16.15.1
3.0.0-rc.13
0.6.1
yarn@1.22.17
vite
typescript
,app
,css
,postcss
,modules
,apollo
@pinia/nuxt@0.4.6
,@nuxtjs/apollo@5.0.0-alpha.4
Build Modules:
-
Describe the bug
When I run it as "yarn dev" it works fine. The problem occurs when running with "yarn start". If I delete the code related to "apollo" in nuxt.config.ts, it works fine.
Expected behaviour
"yarn start" task worked fine
Reproduction
https://github.com/theidlab/theidlab-fe
Since this repository is private, we can temporarily open it if you let us know your github account
Additional context
export default defineNuxtConfig({ typescript: { strict: true, typeCheck: true }, app: { pageTransition: { name: 'page', mode: 'out-in' } }, css: ['~/assets/css/main.css'], postcss: { plugins: { tailwindcss: {}, autoprefixer: {} } }, modules: [ '@nuxtjs/apollo', [ '@pinia/nuxt', { autoImports: ['defineStore'] } ] ], apollo: { autoImports: true, clients: { default: { httpEndpoint: 'http://localhost:8080/graphql' } } } });
Logs