Skip to content

Server side rendering on Angular 4 in Azure: Prerendering failed because of error: Error: Cannot find module #134

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
swaner opened this issue Mar 31, 2017 · 2 comments

Comments

@swaner
Copy link

swaner commented Mar 31, 2017

I have a issue in Azure trying to get server side prerendering to work with Angular 4.
The problem is that node doesn't seem to find any packages. All the modules are in package.json and I can debug locally without any issues.
The project is based on this repo with a few modifications. Any hints of what to look for? Can I somehow see whats going on inside node and get a better error message?

An unhandled exception occurred while processing the request.

Exception: Call to Node module failed with error: Prerendering failed because of error: Error: Cannot find module 'es6-shim'
at Function.Module._resolveFilename (module.js:455:15)
at Function.Module._load (module.js:403:25)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Object. (D:\home\site\wwwroot\Client\dist\main-server.js:2095:18)
at webpack_require (D:\home\site\wwwroot\Client\dist\main-server.js:20:30)
at Object.defineProperty.value (D:\home\site\wwwroot\Client\dist\main-server.js:807:1)
at webpack_require (D:\home\site\wwwroot\Client\dist\main-server.js:20:30)
at Object. (D:\home\site\wwwroot\Client\dist\main-server.js:2164:1)
at webpack_require (D:\home\site\wwwroot\Client\dist\main-server.js:20:30)
Current directory is: D:\home\site\wwwroot

@MarkPieszak
Copy link
Member

@hakonamatata Jan did you run into this at all?

Did node_modules install properly, es6-shim is in the package.json (soon to be replaced with core-js).
There are some logs somewhere in Azure you can check to see if they give any other info, did anything come up when you tried pushing to Azure? I'm guessing that's when it might of happened?

@MarkPieszak
Copy link
Member

There have been major project changes via #151 let me know if this is still an issue, I need to actually run through some tests to see how Azure deployment is going to work now that we have AoT and a few other big things added today.

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

No branches or pull requests

2 participants