question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error with latest version (6.7.0) when trying to run with Angular

See original GitHub issue
Warning: 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:closed
  • Created 2 years ago
  • Reactions:6
  • Comments:25 (10 by maintainers)

github_iconTop GitHub Comments

3reactions
pelordcommented, Sep 16, 2021

@mhosman , this last solution also fix my problem !

3reactions
mhosmancommented, Sep 15, 2021

Thanks @ahocevar I fixed the issue. It seems I was doing the wrong import and importing all the sources:

Changed this:

import { Vector as VectorSource, XYZ } from 'ol/source';

To this:

import VectorSource from 'ol/source/Vector';
import XYZ from 'ol/source/XYZ';
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found