aspnet-starter-kit-2.0
aspnet-starter-kit-2.0 copied to clipboard
NodeInvocationException: Prerendering failed because of error: Error: Cannot find module
I've tried to run it on Windows 10 and got this issue. I'm still investigating more, but maybe someone can give me a clue.
NodeInvocationException: Prerendering failed because of error: Error: Cannot find module '(...) wwwroot\dist\server\main-server'
the main-server.js file is there and seems to be ok.
Microsoft Windows [Version 10.0.17134.523] Node v11.4.0
What command are you using to start the server ? What is your node, npm and yarn version? you have to be in the root of the project to run the command line.
Try maybe to clean everything and reinstall once again with those commands assuming you use yarn.
yarn cache clean // if using yarn
git clean -dxf
yarn install
yarn start
Hope this helps
In my case this was because I used a long name for the root path. Change it to a simpler and shorter one and it should work