Open issue-up[bot] opened 1 year ago
Hi, same problem here (I do use TypeScript in ~/server). Nuxt server project with knex fails in preview/production mode.
Operating System: Windows_NT Node Version: v22.6.0 Nuxt Version: 3.12.4 Nitro Version: 2.9.7 Package Manager: bun@1.1.24 Builder: vite User Config: devtools, compatibilityVersion : 4 Runtime Modules: - Build Modules: -
Уже больше года проблема не сортируется. Nitro мы помираем?
### Environment ------------------------------ - Operating System: Windows_NT - Node Version: v18.16.0 - Nuxt Version: 3.6.5 - Nitro Version: 2.5.2 - Package Manager: npm@9.5.1 - Builder: vite - User Config: devtools, modules, content, experimental - Runtime Modules: @nuxtjs/tailwindcss@6.8.0, @nuxt/content@2.7.2, @nuxtjs/eslint-module@4.1.0 - Build Modules: - ------------------------------ ### Reproduction https://github.com/bvqbao/nuxt3-module-notfound ### Describe the bug I have created some API in ~/server/api. The API use knex package to access to an SQLite DB. In dev mode (```npm run dev```), the API work as expected: However, when I build the server for production (```npm run build```) and run the server (```npm run preview```), the server returns an error about "Cannot find package ..." knex, altho it is present in ```./output/server/node_modules```: I don't use TypeScript but JavaScript in ~/server. ### Additional context _No response_ ### Logs _No response_