Hi, I wanted to test out foundation spa react but got errors before I could start. I downloaded the project and, ran setup.cmd as an administrator and submitted project name, domain etc. But then I got these errors.
Error: Cannot find module 'dotenv'
Require stack:
- C:\dev\FoundationTest\src\Spa.Frontend\node_modules\@episerver\webpack\cjs\util\Config.js
- C:\dev\FoundationTest\src\SpaFrontend\node_modules\@episerver\webpack\cjs\util\CliArguments.js
- C:\dev\FoundationTest\src\Spa.Frontend\node_modules\@episerver\webpack\cjs\bin\epi-auth.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
at Function.Module._load (internal/modules/cjs/loader.js:745:27)
at Module.require (internal/modules/cjs/loader.js:961:19)
at require (internal/modules/cjs/helpers.js:92:18)
at Object.<anonymous> (C:\dev\FoundationTest\src\Spa.Frontend\node_modules\@episerver\webpack\cjs\util\Config.js:9:34)
at Module._compile (internal/modules/cjs/loader.js:1072:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Module.load (internal/modules/cjs/loader.js:937:32)
at Function.Module._load (internal/modules/cjs/loader.js:778:12)
at Module.require (internal/modules/cjs/loader.js:961:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\dev\\FoundationTest\\src\\Spa.Frontend\\node_modules\\@episerver\\webpack\\cjs\\util\\Config.js',
'C:\\dev\\FoundationTest\\src\\Spa.Frontend\\node_modules\\@episerver\\webpack\\cjs\\util\\CliArguments.js',
'C:\\dev\\FoundationTest\\src\\Spa.Frontend\\node_modules\\@episerver\\webpack\\cjs\\bin\\epi-auth.js'
]
}
> foundation-spa-frontend@1.0.0 build:production C:\dev\FoundationTest\src\Spa.frontend
> npx epi-sync-models -e production && npx webpack --env EPI_ENV=production --env NODE_ENV=production && npx epi-sync-models -e development
internal/modules/cjs/loader.js:892
throw err;
^
Error: Cannot find module 'dotenv'
Require stack:
- C:\dev\FoundationTest\src\Spa.Frontend\node_modules\@episerver\webpack\cjs\util\Config.js
- C:\dev\FoundationTest\src\Spa.Frontend\node_modules\@episerver\webpack\cjs\util\CliArguments.js
- C:\dev\FoundationTest\src\Spa.Frontend\node_modules\@episerver\webpack\cjs\bin\epi_sync_models.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
at Function.Module._load (internal/modules/cjs/loader.js:745:27)
at Module.require (internal/modules/cjs/loader.js:961:19)
at require (internal/modules/cjs/helpers.js:92:18)
at Object.<anonymous> (C:\dev\FoundationTest\src\Spa.Frontend\node_modules\@episerver\webpack\cjs\util\Config.js:9:34)
at Module._compile (internal/modules/cjs/loader.js:1072:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Module.load (internal/modules/cjs/loader.js:937:32)
at Function.Module._load (internal/modules/cjs/loader.js:778:12)
at Module.require (internal/modules/cjs/loader.js:961:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\dev\\FoundationTest\\src\\Spa.Frontend\\node_modules\\@episerver\\webpack\\cjs\\util\\Config.js',
'C:\\dev\\FoundationTest\\src\\Spa.Frontend\\node_modules\\@episerver\\webpack\\cjs\\util\\CliArguments.js',
'C:\\dev\\FoundationTest\\src\\Spa.Frontend\\node_modules\\@episerver\\webpack\\cjs\\bin\\epi_sync_models.js'
]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! foundation-spa-frontend@1.0.0 build:production: `npx epi-sync-models -e production && npx webpack --env EPI_ENV=production --env NODE_ENV=production && npx epi-sync-models -e development`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the foundation-spa-frontend@1.0.0 build:production script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Alexander\AppData\Roaming\npm-cache\_logs\2021-09-23T14_30_04_474Z-debug.log
Run resetup.cmd to resetup solution
Press any key to continue . . .
I have tried everything I can think of, installing node modules globally, installing all available visual studio packages etc.
Hi, I wanted to test out foundation spa react but got errors before I could start. I downloaded the project and, ran setup.cmd as an administrator and submitted project name, domain etc. But then I got these errors.
I have tried everything I can think of, installing node modules globally, installing all available visual studio packages etc.
Can anyone help me?