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

Importing adapter-begin fails with "type": "module" #1532

Closed
thislooksfun opened this issue May 23, 2021 · 2 comments
Closed

Importing adapter-begin fails with "type": "module" #1532

thislooksfun opened this issue May 23, 2021 · 2 comments

Comments

@thislooksfun
Copy link
Contributor

Describe the bug
I'm trying to add adapter-begin to my freshly-created SvelteKit project, but now svelte-kit build fails with

Cannot find module '<snip>/node_modules/@sveltejs/adapter-begin/index.js' imported from <snip>/svelte.config.js
Did you mean to import @sveltejs/adapter-begin/index.cjs?

Changing it to importing @sveltejs/adapter-begin/index.cjs also fails with the message

Package subpath './index.cjs' is not defined by "exports" in <snip>/node_modules/@sveltejs/adapter-begin/package.json imported from <snip>/svelte.config.js

Logs
N/A

To Reproduce

  1. Create a fresh SvelteKit project, making sure to enable TypeScript
  2. Install adapter-begin
  3. Run npm run build

Expected behavior
I expect to be able to import and use a first-party adapter after creating a project from the first-party scaffold.

Stacktraces
N/A

Information about your SvelteKit Installation:
N/A

Severity
It's blocking my intended use case entirely.

Additional context
n/A

@thislooksfun thislooksfun changed the title Importing adapter-begin fails with "type": "module", Importing adapter-begin fails with "type": "module" May 23, 2021
@macdaddyaz
Copy link

I'm experiencing the same issue. Trying to set up a brand new app w/ SvelteKit & Begin. The app will not start locally, and will not deploy to Begin.

@benmccann
Copy link
Member

There's a new version of the Begin adapter. Please take a look at https://github.com/architect/sveltekit-adapter

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

3 participants