Module not found: Error: Can't resolve './/server/main'
See original GitHub issueAny idea why I am getting this error I dont have any additional changes on this I just install ng-toolkit after npm run build:prod the result is this. Thanks in advance
WARNING in ./node_modules/@angular/core/fesm5/core.js System.import() is deprecated and will be removed soon. Use import() instead. For more info visit https://webpack.js.org/guides/code-splitting/ @ ./server.ts 4826:15-36 5:13-37
WARNING in ./node_modules/@angular/core/fesm5/core.js System.import() is deprecated and will be removed soon. Use import() instead. For more info visit https://webpack.js.org/guides/code-splitting/ @ ./server.ts 4838:15-102 5:13-37
WARNING in configuration The ‘mode’ option has not been set, webpack will fallback to ‘production’ for this value. Set ‘mode’ option to ‘development’ or ‘production’ to enable defaults for each environment. You can also set it to ‘none’ to disable any default behavior. Learn more: https://webpack.js.org/concepts/mode/
ERROR in ./server.ts
Module not found: Error: Can’t resolve ‘.//server/main’ in ‘d:\tosh-wot-angular’
@ ./server.ts 19:9-34
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! wot@0.0.0 build:server:prod: ng run wot:server && webpack --config webpack.server.config.js --progress --colors
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the wot@0.0.0 build:server:prod 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\Lenovo\AppData\Roaming\npm-cache_logs\2018-06-13T09_42_06_176Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! wot@0.0.0 build:prod: npm run build:server:prod && npm run build:browser:prod
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the wot@0.0.0 build:prod 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\Lenovo\AppData\Roaming\npm-cache_logs\2018-06-13T09_42_06_441Z-debug.log
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:20 (4 by maintainers)
Top GitHub Comments
Hey. Your project is not in latest Angular.
@ng-toolkit
supports Angular 6+. Please update to the latest Angular version 😃Angular 8 here, same issue. Not sure if it matters, but when I ran
ng add @ng-toolkit/universal
I had a ton of ts errors (mostly implicitany
s and unused references) in the generatedserver.ts
andprerender.ts
files.