Error: Cannot find module 'dotenv/config'
It happens quite often, just by starting the project.
(I'm on Wasp 0.15.2) same with older versions.
I have to do wasp clean and wasp install (which takes a while).
I'm with W10 WSL
Any solution?
(I'm on Wasp 0.15.2) same with older versions.
I have to do wasp clean and wasp install (which takes a while).
I'm with W10 WSL
Any solution?
:bee: --- Starting compilation and setup phase. Hold tight... ------------------------
:bee: --- Compiling wasp project... --------------------------------------------------
✅ --- Successfully completed npm install. ----------------------------------------
:bee: --- Setting up database... -----------------------------------------------------
✅ --- Database successfully set up. ----------------------------------------------
:bee: --- Building SDK... ------------------------------------------------------------
✅ --- SDK built successfully. ----------------------------------------------------
✅ --- Your wasp project has successfully compiled. -------------------------------
:bee: --- Listening for file changes... ----------------------------------------------
:bee: --- Starting up generated project... -------------------------------------------
[ Client ] > WhiteHatSeoTactics@0.0.0 start
[ Client ] > npm run validate-env && vite
[ Client ]
[ Server ] > server@0.0.0 watch
[ Server ] > nodemon --exec 'npm run bundle-and-start || exit 1'
[ Server ]
[ Client ]
[ Client ] > WhiteHatSeoTactics@0.0.0 validate-env
[ Client ] > node -r dotenv/config ./scripts/validate-env.mjs
[ Client ]
[ Client!] node:internal/modules/cjs/loader:1143
[ Client!] throw err;
[ Client!] ^
[ Client!]
[ Client!] Error: Cannot find module 'dotenv/config'
[ Client!] Require stack:
[ Client!] - internal/preload
[ Client!] at Module._resolveFilename (node:internal/modules/cjs/loader:1140:15)
[ Client!] at Module._load (node:internal/modules/cjs/loader:981:27)
[ Client!] at internalRequire (node:internal/modules/cjs/loader:174:19)
[ Client!] at Module._preloadModules (node:internal/modules/cjs/loader:1569:5)
[ Client!] at loadPreloadModules (node:internal/process/pre_execution:628:5)
[ Client!] at setupUserModules (node:internal/process/pre_execution:154:3)
[ Client!] at prepareExecution (node:internal/process/pre_execution:114:5)
[ Client!] at prepareMainThreadExecution (node:internal/process/pre_execution:40:10)
[ Client!] at node:internal/main/run_main_module:11:19 {
[ Client!] code: 'MODULE_NOT_FOUND',
[ Client!] requireStack: [ 'internal/preload' ]
[ Client!] }
[ Client!]
[ Client!] Node.js v18.20.4:bee: --- Starting compilation and setup phase. Hold tight... ------------------------
:bee: --- Compiling wasp project... --------------------------------------------------
✅ --- Successfully completed npm install. ----------------------------------------
:bee: --- Setting up database... -----------------------------------------------------
✅ --- Database successfully set up. ----------------------------------------------
:bee: --- Building SDK... ------------------------------------------------------------
✅ --- SDK built successfully. ----------------------------------------------------
✅ --- Your wasp project has successfully compiled. -------------------------------
:bee: --- Listening for file changes... ----------------------------------------------
:bee: --- Starting up generated project... -------------------------------------------
[ Client ] > WhiteHatSeoTactics@0.0.0 start
[ Client ] > npm run validate-env && vite
[ Client ]
[ Server ] > server@0.0.0 watch
[ Server ] > nodemon --exec 'npm run bundle-and-start || exit 1'
[ Server ]
[ Client ]
[ Client ] > WhiteHatSeoTactics@0.0.0 validate-env
[ Client ] > node -r dotenv/config ./scripts/validate-env.mjs
[ Client ]
[ Client!] node:internal/modules/cjs/loader:1143
[ Client!] throw err;
[ Client!] ^
[ Client!]
[ Client!] Error: Cannot find module 'dotenv/config'
[ Client!] Require stack:
[ Client!] - internal/preload
[ Client!] at Module._resolveFilename (node:internal/modules/cjs/loader:1140:15)
[ Client!] at Module._load (node:internal/modules/cjs/loader:981:27)
[ Client!] at internalRequire (node:internal/modules/cjs/loader:174:19)
[ Client!] at Module._preloadModules (node:internal/modules/cjs/loader:1569:5)
[ Client!] at loadPreloadModules (node:internal/process/pre_execution:628:5)
[ Client!] at setupUserModules (node:internal/process/pre_execution:154:3)
[ Client!] at prepareExecution (node:internal/process/pre_execution:114:5)
[ Client!] at prepareMainThreadExecution (node:internal/process/pre_execution:40:10)
[ Client!] at node:internal/main/run_main_module:11:19 {
[ Client!] code: 'MODULE_NOT_FOUND',
[ Client!] requireStack: [ 'internal/preload' ]
[ Client!] }
[ Client!]
[ Client!] Node.js v18.20.4