Skip to content
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

Unnecessary warning from node_modules #1254

Closed
ephjos opened this issue May 6, 2021 · 0 comments
Closed

Unnecessary warning from node_modules #1254

ephjos opened this issue May 6, 2021 · 0 comments

Comments

@ephjos
Copy link

ephjos commented May 6, 2021

While bundling we are running into the following warning:

 > node_modules/javascript-astar/package.json:17:2: warning: Duplicate key "main" in object literal
    17 │   "main": "./astar.js",
       ╵   ~~~~~~

Referring to the javascript-astar source code, this warning is correct since main is set twice in its package.json. However, this warning is seemingly useless when coming from an external dependency. In our build script, using the JavaScript API, we were able to go with the second option from this comment on a similar issue and suppress this warning for our builds.

For running our unit tests using karma, we are unable to access the API in the same fashion leading to the warnings being printed out each time our application is rebuilt. The only option to silence this warning in this scenario is to set logLevel: 'error' which will hide all of the warnings. We would like to avoid this if possible.

If possible, could this type of warning be ignored by esbuild when coming from node_modules?

@evanw evanw closed this as completed in 8fccac3 May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant