You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On running the command for server-side rendering: ng run project-name:server:production
Getting the following error:
ERROR in ./node_modules/swarm-js/node_modules/got/index.js Module not found: Error: Can't resolve './package' in 'Project-path\node_modules\swarm-js\node_modules\got'
ERROR in ./node_modules/swarm-js/node_modules/got/index.js Module not found: Error: Can't resolve 'electron' in 'Project-path\node_modules\swarm-js\node_modules\got'
I'm using the Angular 10 and windows system.
Introspecting further I reached to below two conclusions:
One of the libraries is trying to require package.json file using the below command
const pkg = require('./package');
We are using a library that uses a conditional require statement which tries to require electron if the condition fulfills.
In the first case, the SSR build is unable to require package.json if the extension is not mentioned.
In the second case, SSR build is trying to resolve the conditional require statements as well.
Please help in resolving this issue by upgrading the version of got to lastest as they have resolved this issue in their latest version.
The text was updated successfully, but these errors were encountered:
On running the command for server-side rendering: ng run project-name:server:production
Getting the following error:
ERROR in ./node_modules/swarm-js/node_modules/got/index.js
Module not found: Error: Can't resolve './package' in 'Project-path\node_modules\swarm-js\node_modules\got'
ERROR in ./node_modules/swarm-js/node_modules/got/index.js
Module not found: Error: Can't resolve 'electron' in 'Project-path\node_modules\swarm-js\node_modules\got'
I'm using the Angular 10 and windows system.
Introspecting further I reached to below two conclusions:
One of the libraries is trying to require package.json file using the below command
const pkg = require('./package');
We are using a library that uses a conditional require statement which tries to require electron if the condition fulfills.
In the first case, the SSR build is unable to require package.json if the extension is not mentioned.
In the second case, SSR build is trying to resolve the conditional require statements as well.
Please help in resolving this issue by upgrading the version of got to lastest as they have resolved this issue in their latest version.
The text was updated successfully, but these errors were encountered: