Have following versions:
"angular": 6.0.3
"rxjs": "^6.2.0",
"@mapbox/mapbox-gl-draw": "^1.0.4",
Could anyone help me out, will be appreciated..
Have following versions:
"angular": 6.0.3
"rxjs": "^6.2.0",
"@mapbox/mapbox-gl-draw": "^1.0.4",
Could anyone help me out, will be appreciated..
On
actually a way to resolve this issue was ignoring the fs require in webpack.config.js but in angular-cli version 6 and upper we can't eject webpack.config.js based on this issue and issue.so we can't say webpack to ignore fs.it seems we can't use fs anymore in Angular-cli 6 and upper.You can declare the fs also by doing declare var fs: any;this solves ng serve but if you build the project then run npm run serve, will face the error:
'fs' is not defined.
The issue here is that Angular CLI v6 no longer ships with support for node built-in modules, see here. This fix is outlined in a comment further down the issue thread here:
In
polyfills.tsadd:(window as any).fs = window;