We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi there,
I'm encountering an error when running npx unlighthouse --site http://localhost:3000 for my Nuxt.js app. The error message is
npx unlighthouse --site http://localhost:3000
file:///C:/Users/userName/AppData/Local/npm-cache/_npx/944eljfcbfwrdfffb/node_modules/cli-boxes/index.js:1 import cliBoxes from './boxes.json' with {type: 'json'}; ^^^^ SyntaxError: Unexpected token 'with' at DefaultModuleLoader.moduleStrategy (node:internal/modules/esm/translators:116:18) at DefaultModuleLoader.moduleProvider (node:internal/modules/esm/loader:190:14) Node.js v20.5.1
To resolve it, I modified the import statement in index.js from
index.js
import cliBoxes from './boxes.json' with {type: 'json'};
to
import cliBoxes from './boxes.json' assert {type: 'json'};
This change fixed the issue. I'm using Node.js version 20.5.1. I couldn't find any related information online, so I wanted to report this here.
No response
The text was updated successfully, but these errors were encountered:
I am also having the same issue in node 18
npx unlighthouse --site https://jyothikrishna.vercel.app `file:///home/adarsh/.nvm/versions/node/v18.18.2/lib/node_modules/unlighthouse/node_modules/cli-boxes/index.js:1
npx unlighthouse --site https://jyothikrishna.vercel.app
import cliBoxes from './boxes.json' with {type: 'json'}; ^^^^ SyntaxError: Unexpected token 'with' at ESMLoader.moduleStrategy (node:internal/modules/esm/translators:119:18) at ESMLoader.moduleProvider (node:internal/modules/esm/loader:468:14) Node.js v18.18.2 ```
Sorry, something went wrong.
For now, I recommend using the 0.13.0 version.
0.13.0
npx [email protected] --site https://jyothikrishna.vercel.app
df1029a
No branches or pull requests
Describe the bug
Hi there,
I'm encountering an error when running
npx unlighthouse --site http://localhost:3000
for my Nuxt.js app. The error message isTo resolve it, I modified the import statement in
index.js
fromto
This change fixed the issue. I'm using Node.js version 20.5.1. I couldn't find any related information online, so I wanted to report this here.
Reproduction
No response
System / Nuxt Info
No response
The text was updated successfully, but these errors were encountered: