Skip to content
This repository has been archived by the owner on Jun 15, 2020. It is now read-only.

NodeInvocationException: Prerendering failed because of error: Error: Cannot find module #49

Open
fera2k opened this issue Jan 30, 2019 · 2 comments

Comments

@fera2k
Copy link

fera2k commented Jan 30, 2019

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

@tjaskula
Copy link
Collaborator

tjaskula commented Feb 6, 2019

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

@lebronjl
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants