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
The build fails with the error message: ModuleNotFoundError: Module not found: Error: Can't resolve 'mongodb' in 'path/to/node_modules/typeorm/platform'
Note that the error message can vary in the db name between build attempts, e.g. : ModuleNotFoundError: Module not found: Error: Can't resolve 'mysql' in 'path/to/node_modules/typeorm/platform'
Description 🐜
I am trying to run the Next CLI build command in a create-next-app project with Next Auth set up with the following configuration:
The build fails with the error message:
ModuleNotFoundError: Module not found: Error: Can't resolve 'mongodb' in 'path/to/node_modules/typeorm/platform'
Note that the error message can vary in the db name between build attempts, e.g. :
ModuleNotFoundError: Module not found: Error: Can't resolve 'mysql' in 'path/to/node_modules/typeorm/platform'
Is this a bug in your own project?
No
How to reproduce ☕️
https://codesandbox.io/s/trusting-river-qvi59?file=/next.config.js
yarn build
in terminalModuleNotFoundError: Module not found: Error: Can't resolve 'mongodb' in 'path/to/node_modules/typeorm/platform'
Screenshots / Logs 📽
Environment 🖥
System:
OS: Linux 5.4 Debian GNU/Linux 10 (buster) 10 (buster)
CPU: (8) x64 Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
Memory: 3.76 GB / 62.61 GB
Container: Yes
Shell: 5.0.3 - /bin/bash
Binaries:
Node: 14.16.1 - ~/.nvm/versions/node/v14.16.1/bin/node
Yarn: 1.22.10 - ~/.nvm/versions/node/v14.16.1/bin/yarn
npm: 6.14.12 - ~/.nvm/versions/node/v14.16.1/bin/npm
npmPackages:
next: ^11.0.0 => 11.0.1
next-auth: latest => 3.17.2
react: ^17.0.2 => 17.0.2
The text was updated successfully, but these errors were encountered: