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

initial error module not found #16

Closed
wibed opened this issue Jan 27, 2023 · 4 comments
Closed

initial error module not found #16

wibed opened this issue Jan 27, 2023 · 4 comments
Assignees

Comments

@wibed
Copy link

wibed commented Jan 27, 2023

ERROR in ./node_modules/prevent-overscrolling/dist/mjs/index.js 1:0-51
Module not found: Error: Can't resolve './scrollable-area' in './node_modules/prevent-overscrolling/dist/mjs'
Did you mean 'scrollable-area.js'?
BREAKING CHANGE: The request './scrollable-area' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
resolve './scrollable-area' in './node_modules/prevent-overscrolling/dist/mjs'
  using description file: ./node_modules/prevent-overscrolling/dist/mjs/package.json (relative path: .)
    Field 'browser' doesn't contain a valid alias configuration
    using description file: ./node_modules/prevent-overscrolling/dist/mjs/package.json (relative path: ./scrollable-area)
      Field 'browser' doesn't contain a valid alias configuration
      ./node_modules/prevent-overscrolling/dist/mjs/scrollable-area doesn't exist
@bameyrick
Copy link
Owner

What are you using to build? I'm guessing by the error generated it's webpack?

@bameyrick bameyrick self-assigned this Jan 27, 2023
@wibed
Copy link
Author

wibed commented Jan 27, 2023

@bameyrick
webpack 5.75.0

@bameyrick
Copy link
Owner

Could you try the suggested change in this StackOverflow answer and see if this helps you?

The project is built using tsc and it looks like exporting with the extensions is not supported.

@wibed
Copy link
Author

wibed commented Jan 28, 2023

i havent tried but sure it works. i deem this question as answered.
thank you for your time.

@wibed wibed closed this as completed Jan 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants