Error with latest version (6.7.0) when trying to run with Angular
See original GitHub issueWarning: E:\.....\node_modules\geotiff\src\compression\deflate.js depends on 'pako/lib/inflate'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: E:\.....\node_modules\geotiff\src\geotiffimage.js depends on 'txml'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: E:\.....\node_modules\geotiff\src\source\blockedsource.js depends on 'lru-cache'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
./node_modules/geotiff/src/source/client/http.js:2:0-24 - Error: Module not found: Error: Can't resolve 'http' in 'E:\.....\node_modules\geotiff\src\source\client'
Did you mean './http'?
Requests that should resolve in the current directory need to start with './'.
Requests that start with a name are treated as module requests and resolve within module directories (E:/...../src, node_modules).
If changing the source code is not an option there is also a resolve options called 'preferRelative' which tries to resolve these kind of requests in the current directory too.
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "http": require.resolve("stream-http") }'
- install 'stream-http'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "http": false }
./node_modules/geotiff/src/source/client/http.js:3:0-26 - Error: Module not found: Error: Can't resolve 'https' in 'E:\.....\node_modules\geotiff\src\source\client'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "https": require.resolve("https-browserify") }'
- install 'https-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "https": false }
./node_modules/geotiff/src/source/file.js:2:0-39 - Error: Module not found: Error: Can't resolve 'fs' in 'E:\.....\pwa\node_modules\geotiff\src\source'
Issue Analytics
- State:
- Created 2 years ago
- Reactions:6
- Comments:25 (10 by maintainers)
Top Results From Across the Web
Freshly installed Angular Cli gives error rather than running
First, ensure you have Node 4.x and NPM 3.x. Note that Node 4.x (at least up to 4.4.2, possibly newer versions) comes with...
Read more >VMware vCenter Server 6.7 Update 3j Release Notes
This issue is resolved in this release. Registration of a virtual machine template fails the vpxd service and the vCenter Server system becomes ......
Read more >Cannot find module '@angular-devkit/core' - MSDN - Microsoft
I am trying to install Angular to my pc to start some web projects ... >ng serve or ng "new app" gives me...
Read more >Setting up the local environment and workspace - Angular
This guide explains how to set up your environment for Angular development using the Angular CLI tool. It includes information about prerequisites, ...
Read more >PhoneCat Tutorial App - AngularJS: API
If you want to update a dependency to a version newer than what the specificed range would permit, you can change the version...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mhosman , this last solution also fix my problem !
Thanks @ahocevar I fixed the issue. It seems I was doing the wrong import and importing all the sources:
Changed this:
To this: