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
In a project with a package.json set to "type": "module", node changes their file interpretation to ESM. If I want to keep my pa11y JS config the same, I tried to use the .cjs extension to have Node parse the file as commonjs. But it seems like pa11y is trying to interpret the file as JSON and failing.
> pa11y-ci -c _build/tests/pa11y.cjs
There was a problem loading "/Users/ajciccarello/project/_build/tests/pa11y.cjs":
SyntaxError: Unexpected token 'c', "const test"... is not valid JSON
at JSON.parse (<anonymous>)
at loadLocalConfigUnmodified (/Users/ajciccarello/project/node_modules/pa11y-ci/bin/pa11y-ci.js:165:15)
at /Users/ajciccarello/project/node_modules/pa11y-ci/bin/pa11y-ci.js:124:13
at new Promise (<anonymous>)
at loadConfig (/Users/ajciccarello/project/node_modules/pa11y-ci/bin/pa11y-ci.js:120:9)
at /Users/ajciccarello/project/node_modules/pa11y-ci/bin/pa11y-ci.js:70:10
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
The text was updated successfully, but these errors were encountered:
In a project with a package.json set to
"type": "module"
, node changes their file interpretation to ESM. If I want to keep my pa11y JS config the same, I tried to use the.cjs
extension to have Node parse the file as commonjs. But it seems like pa11y is trying to interpret the file as JSON and failing.The text was updated successfully, but these errors were encountered: