You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get an error for /github/workspace/setPreviewCookies.js
Steps to reproduce
Add type: "module" to package.json file
Push the changes to repo for trigger github action
Logs
Run shopify/[email protected]
==============================
Configuring Lighthouse CI
Fetching product handle
Using gift-card
==============================
Running Lighthouse CI
✅ .lighthouseci/ directory writable
✅ Configuration file found
✅ Chrome installation found
✅ GitHub token set
Healthcheck passed!
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /github/workspace/setPreviewCookies.js
require() of ES modules is not supported.
require() of /github/workspace/setPreviewCookies.js from /.node/lib/node_modules/@lhci/cli/src/collect/puppeteer-manager.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename setPreviewCookies.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /github/workspace/package.json.
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1102:13)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:14)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:92:18)
at PuppeteerManager.invokePuppeteerScriptForUrl (/.node/lib/node_modules/@lhci/cli/src/collect/puppeteer-manager.js:107:20)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Object.runCommand (/.node/lib/node_modules/@lhci/cli/src/collect/collect.js:[24](https://github.com/sleeksetup/spirit/actions/runs/6708996679/job/18231056912#step:4:25)0:7)
at async run (/.node/lib/node_modules/@lhci/cli/src/cli.js:103:7)
The text was updated successfully, but these errors were encountered:
Describe the bug
I get an error for
/github/workspace/setPreviewCookies.js
Steps to reproduce
type: "module"
topackage.json
fileLogs
The text was updated successfully, but these errors were encountered: