listhen icon indicating copy to clipboard operation
listhen copied to clipboard

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

Open nethriis opened this issue 8 months ago • 0 comments

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

nethriis avatar May 28 '24 19:05 nethriis