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

ERR_IMPORT_ASSERTION_TYPE_MISSING when importing Netlify plugin #9462

Closed
1 task
craig-jennings opened this issue Dec 18, 2023 · 1 comment
Closed
1 task
Labels
needs triage Issue needs to be triaged

Comments

@craig-jennings
Copy link

craig-jennings commented Dec 18, 2023

Astro Info

Astro                    v4.0.6
Node                     v20.10.0
System                   Windows (x64)
Package Manager          pnpm
Output                   hybrid
Adapter                  netlify
Integrations             none

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

I'm also getting an error when setting up a new project with the Netlify plugin

  1. pnpm create astro@latest
  2. pnpm astro add netlify
  3. Correct the generated import path to be @astrojs/netlify
  4. pnpm build

This command fails with

[vite] Error when evaluating SSR module .\astro.config.mjs: failed to import "@astrojs/netlify"
|- TypeError [ERR_IMPORT_ASSERTION_TYPE_MISSING]: Module "./node_modules/.pnpm/@astrojs+netlify@4.0.0_astro@4.0.6/node_modules/@astrojs/netlify/package.json" needs an import attribute of type "json"

Note this happens with the corrected path for the netlify plugin (so not a result of #9459)

What's the expected result?

The build to succeed

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-ibypto?file=astro.config.mjs

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Dec 18, 2023
@craig-jennings
Copy link
Author

Ah, looks like someone's already working on it - withastro/adapters#104

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant