-
Notifications
You must be signed in to change notification settings - Fork 12k
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
webpack config node miss #11458
Comments
I am experiencing this issue as well and I hope it can be resolved but I also believe that this might be a duplicate of this issue here: #10681 |
I'm sorry to say but this is expected behaviour. You can read more about why we disabled these imports in #9827. |
@filipesilva i get it because of environment . but i'd like to find an entry to write config like setting node config. i not find it in scema.json page. can you help me where override webpack config. thank you~ |
Hi @filipesilva , I can understand why node modules are disabled. But most of npm packages those import or require nodejs modules don't work any more. Do you have a workaround? |
@liuxh0 while not an official solution you can try this package (not mine) https://github.com/meltedspark/angular-cli-builders. It allows you to extend the angular cli webpack config. You take the risk of future updates being incompatible but gain the ability to obtain the flexibility you are looking for. The Angular CLI team has been fantastic about making the cli modular and this package takes advantage of this. |
@Plysepter Thanks for your advice. I've solved by problem by adding |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Module not found: Error: Can't resolve 'fs' in '/home/mengqingyun/iserver/src/frontend/node_modules/yamljs/lib'.
when i run my product on dev model, i find this issue.
so we add this to your config:
node: {
fs: "empty"
}.
but with lastest version of angular-cli@6.0.7. i can't find entry to add this config.
under is part of my angular.json:
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "frontend:build"
},
"configurations": {
"production": {
"browserTarget": "frontend:build:production"
}
}
}
so i try to read resource fo @angular-devkit/build-angular .
browser, find node is false.
if change to fs: “empty”. problem is solved.
alse i find other config file all set node like webpack.config.common.js
node: {
fs: 'empty',
global: true,
crypto: 'empty',
tls: 'empty',
net: 'empty',
process: true,
module: false,
clearImmediate: false,
setImmediate: false
}
The text was updated successfully, but these errors were encountered: