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

Warnings when compiling with webpack #335

Open
tophtucker opened this issue Dec 2, 2022 · 0 comments
Open

Warnings when compiling with webpack #335

tophtucker opened this issue Dec 2, 2022 · 0 comments

Comments

@tophtucker
Copy link
Contributor

When building a project that depends on stdlib using Webpack (e.g. a create-react-app where you've installed the runtime and a notebook), you get 53 warnings in the terminal:

WARNING in ./node_modules/@observablehq/stdlib/src/ lazy ^.*.*$ strict namespace object @observablehq/stdlib/src/arrow.js
Module not found: Error: Package path ./src/arrow.js is not exported from package /Users/tophtucker/Development/obs-test/node_modules/@observablehq/stdlib (see exports field in /Users/tophtucker/Development/obs-test/node_modules/@observablehq/stdlib/package.json)

WARNING in ./node_modules/@observablehq/stdlib/src/ lazy ^.*.*$ strict namespace object @observablehq/stdlib/src/dependencies.js
Module not found: Error: Package path ./src/dependencies.js is not exported from package /Users/tophtucker/Development/obs-test/node_modules/@observablehq/stdlib (see exports field in /Users/tophtucker/Development/obs-test/node_modules/@observablehq/stdlib/package.json)

WARNING in ./node_modules/@observablehq/stdlib/src/ lazy ^.*.*$ strict namespace object @observablehq/stdlib/src/dependency.js
Module not found: Error: Package path ./src/dependency.js is not exported from package /Users/tophtucker/Development/obs-test/node_modules/@observablehq/stdlib (see exports field in /Users/tophtucker/Development/obs-test/node_modules/@observablehq/stdlib/package.json)

…and so on for fifty other paths. I don't know quite what it's saying… is it that we export more than we list in package.json? Does it matter? Cf. webpack/webpack#9509, https://webpack.js.org/guides/package-exports/.

It makes the terminal pretty noisy; a customer was concerned the notebook wasn't working properly because of all the (what looked like) errors. Maybe there's a way to fix that. But if this is just a webpack idiosyncrasy, then we can close; we don't have to be beholden to what they choose to warn about.

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