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

svelte is an invalid ES Module #5617

Closed
tanhauhau opened this issue Oct 30, 2020 · 2 comments · Fixed by #5624
Closed

svelte is an invalid ES Module #5617

tanhauhau opened this issue Oct 30, 2020 · 2 comments · Fixed by #5624

Comments

@tanhauhau
Copy link
Member

tanhauhau commented Oct 30, 2020

Describe the bug

From webpack/webpack#11875

node node_modules/svelte/index.mjs
Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import '/home/evilebottnawi/IdeaProjects/copy-webpack-plugin/node_modules/svelte/internal' is not supported resolving ES modules imported from /path/to/node_modules/svelte/index.mjs
    at finalizeResolution (internal/modules/esm/resolve.js:267:17)
    at moduleResolve (internal/modules/esm/resolve.js:668:10)
    at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:758:11)
    at Loader.resolve (internal/modules/esm/loader.js:100:40)
    at Loader.getModuleJob (internal/modules/esm/loader.js:246:28)
    at ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:47:40)
    at link (internal/modules/esm/module_job.js:46:36) {
  code: 'ERR_UNSUPPORTED_DIR_IMPORT',
  url: 'file:///home/evilebottnawi/IdeaProjects/copy-webpack-plugin/node_modules/svelte/internal'
}

Logs
Please include browser console and server logs around the time this bug occurred.

To Reproduce
To help us help you, if you've found a bug please consider the following:

  • If you can demonstrate the bug using https://svelte.dev/repl, please do.
  • If that's not possible, we recommend creating a small repo that illustrates the problem.
  • Reproductions should be small, self-contained, correct examples – http://sscce.org.

Occasionally, this won't be possible, and that's fine – we still appreciate you raising the issue. But please understand that Svelte is run by unpaid volunteers in their free time, and issues that follow these instructions will get fixed faster.

Expected behavior
A clear and concise description of what you expected to happen.

Stacktraces
If you have a stack trace to include, we recommend putting inside a <details> block for the sake of the thread's readability:

Stack trace

Stack trace goes here...

Information about your Svelte project:

  • Your browser and the version: (e.x. Chrome 52.1, Firefox 48.0, IE 10)

  • Your operating system: (e.x. OS X 10, Ubuntu Linux 19.10, Windows XP, etc)

  • Svelte version (Please check you can reproduce the issue with the latest release!)

  • Whether your project uses Webpack or Rollup

Severity
How severe an issue is this bug to you? Is this annoying, blocking some users, blocking an upgrade or blocking your usage of Svelte entirely?

Note: the more honest and specific you are here the more we will take you seriously.

Additional context
Add any other context about the problem here.

@WofWca
Copy link

WofWca commented Oct 31, 2020

Related #5003

@Conduitry
Copy link
Member

The imports in the published package should now be fixed in 3.29.5.

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

Successfully merging a pull request may close this issue.

3 participants