Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Payload 2.0 - Module dotenv not found

default discord avatar
tyteen4a03last year
5

Getting this error when running dev server on Payload 2.0:



ERROR in ./src/payload.config.ts 130:0-28
Module not found: Error: Can't resolve 'dotenv' in '/Users/tyteen4a03/Documents/CodeProjects/Crisis/christmas-js/apps/backend/src'

webpack compiled with 1 error and 1 warning
Watchpack Error (watcher): Error: ENOTDIR: not a directory, watch '/Users/tyteen4a03/Documents/CodeProjects/Crisis/christmas-js/node_modules/@payloadcms/bundler-webpack/dist/mocks/emptyModule.js/mocks'
Watchpack Error (initial scan): Error: ENOTDIR: not a directory, scandir '/Users/tyteen4a03/Documents/CodeProjects/Crisis/christmas-js/node_modules/@payloadcms/bundler-webpack/dist/mocks/emptyModule.js/mocks'
Watchpack Error (initial scan): Error: ENOTDIR: not a directory, scandir '/Users/tyteen4a03/Documents/CodeProjects/Crisis/christmas-js/node_modules/@payloadcms/bundler-webpack/dist/mocks/emptyModule.js'
Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team..