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

ERROR ParseError: C:\: Support for the experimental syntax 'importAttributes' isn't currently enabled #176

Open
nethriis opened this issue May 28, 2024 · 0 comments

Comments

@nethriis
Copy link

Environment

OS: Windows 11
Node version: v20.10.0
Package manager: [email protected]

Reproduction

app.ts

import { createApp, createRouter, defineEventHandler } from 'h3'

export const app = createApp()

const router = createRouter()

app.use(router)

router.get('/authorize', defineEventHandler(async () => {
	return '<h1>Hello</h1>'
}))

Describe the bug

When I run the command :

listhen -w --open ./app.ts

I have that error :

 ERROR  ParseError: C:\: Support for the experimental syntax 'importAttributes' isn't currently enabled (250:105):          listhen 15:38:49



Add @babel/plugin-syntax-import-attributes (https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-attributes) to the 'plugins' section of your Babel config to enable parsing.
 C:/path/to/app/node_modules/.pnpm/@[email protected]/node_modules/@poppinss/utils/build/index.js:250:104        



  Add @babel/plugin-syntax-import-attributes (https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-attributes) to the 'plugins' section of your Babel config to enable parsing.
  C:/path/to/app/node_modules/.pnpm/@[email protected]/node_modules/@poppinss/utils/build/index.js:250:104       
  at C:/path/to/app/node_modules/.pnpm/[email protected]/node_modules/edge.js/build/index.js:17:14
  at C:/path/to/app/app.ts:1:171

Additional context

No response

Logs

No response

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