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.

warning with webpack5

See original GitHub issue

Describe the bug

not ok when using webpack5.

Expected behavior

should use default export instead of named export

Actual behavior

there comes a warning as blow: in /node_modules/esri-leaflet/src/EsriLeaflet.js Should not import the named export ‘version’ (reexported as ‘VERSION’) from default-exporting module (only default export is available soon) image

To Reproduce

using webpack5

Environment Information

  • Version of Leaflet (L.version): 1.7.1
  • Version of Esri Leaflet (L.esri.VERSION): 2.5.2
  • Your OS: window 10
  • Browser and Version Chrome 87.0.4280.88

Additional context

webpack: 5.11.0;

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

6reactions
wwwwlm-workcommented, Jan 4, 2021

here is the demo repo to reproduce : https://github.com/wwwwlm-work/issue-demo

blow is what I did to prevent that warning temporarily:

// current
export {version as VERSION} from '../package.json';

// improved
import pkg from '../package.json'
const VERSION = pkg.version;
export { VERSION };
2reactions
daanielcarvalhocommented, Mar 15, 2021

Hello

There is any solution on this?

ERROR in ./node_modules/esri-leaflet/src/EsriLeaflet.js 2:0-51
Should not import the named export 'version' (reexported as 'VERSION') from default-exporting module (only default export is available soon)
 @ ./node_modules/esri-leaflet-geocoder/dist/esri-leaflet-geocoder-debug.js

when compiling webpack 5 get this erros, and this package is a dependency of other packages, forking it’s not a solution.´

Thanks Daniel

Read more comments on GitHub >

github_iconTop Results From Across the Web

component-driven/cypress-axe - Warnings with Webpack 5
WARNING in ./node_modules/cypress-axe/dist/index.js 16:47-54 Critical dependency: require function is used in a way in which dependencies ...
Read more >
webpack compiles with warnings, but the warning messages ...
I am using the latest versions of Node, NPM, webpack and the UglifyJS webpack plugin. I am running this on Windows. I get...
Read more >
warnings-to-errors-webpack-plugin - npm
warnings -to-errors-webpack-plugin. TypeScript icon, indicating that this package has built-in type declarations.
Read more >
webpack.Compilation.warnings JavaScript and Node.js code ...
When process.env.CI = true, warnings are treated as failures. Most CI servers set this automatically.', stats.compilation.warnings);
Read more >
Stats - webpack
warning. This option does not have any effect when using the Node.js API. ... 'summary', none, Output webpack version, warnings count and errors...
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