eslint-config error: cannot access C: due to not declared in deps (Yarn v3 PnP)

Full error: Error: synckit tried to access "C:, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
11 Replies
Favna
Favna16mo ago
No idea what this error is, but i highly doubt it's related to the package. If anything it's eslint itself throwing the error. Other than that if it fails to read C: then you somehow messed up your windows or god knows what.
Favna
Favna16mo ago
yeah that is clearly not @sapphire/eslint-config. That's something related to synckit, whatever that may be
imide
imideOP16mo ago
i tried eslint and programmer's hangout, they said go ehre
Favna
Favna16mo ago
well idk bro but the error very clearly says the problem is in synckit
imide
imideOP16mo ago
synckit claimed to solve the issue and to add certain stuff to ur eslint since they are a dep of eslint many people said they fixed it and i added what they said and it still doesnt work
imide
imideOP16mo ago
Stack Overflow
eslint "synckit" resolve error where yarn berry pnp
when run next lint or eslint below error has occured ./src/pages/_app.page.tsx 1:1 Error: Resolve error: synckit tried to access ", but it isn't declared in its dependencies; this makes the r...
imide
imideOP16mo ago
GitHub
GitHub - un-ts/synckit: Perform async work synchronously in Node.js...
Perform async work synchronously in Node.js using worker_threads with first-class TypeScript support. - GitHub - un-ts/synckit: Perform async work synchronously in Node.js using worker_threads ...
Favna
Favna16mo ago
well again idk mate but that error is not related to our package and no one else has that issue. Something is clearly fucked up on your system or something. Either send a github repo / zip of the code so I can more thoroughly look into it at some time or try and fix it yourself
imide
imideOP16mo ago
the issue is yarn PnP.
imide
imideOP16mo ago
@Favna i did tests with the default eslint/prettier config and the sapphire, the default works flawlessly while the sapphire one fails
Oops! Something went wrong! :(

ESLint: 8.47.0

Error: synckit tried to access "C:, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

Required package: "C: (via ""C:\Users\zach\Downloads\bots")
Required by: synckit@npm:0.8.5 (via C:\Users\zach\Downloads\bots test\test_bug\.yarn\cache\synckit-npm-0.8.5-40a594eb38-fb6798a2db.zip\node_modules\synckit\lib\)

Require stack:
- C:\Users\zach\Downloads\bots test\test_bug\.yarn\cache\synckit-npm-0.8.5-40a594eb38-fb6798a2db.zip\node_modules\synckit\lib\index.cjs
- C:\Users\zach\Downloads\bots test\test_bug\.yarn\__virtual__\eslint-plugin-prettier-virtual-9c990f1546\0\cache\eslint-plugin-prettier-npm-5.0.0-2f21113cba-4ea0e5f82a.zip\node_modules\eslint-plugin-prettier\eslint-plugin-prettier.js
- C:\Users\zach\Downloads\bots test\test_bug\.yarn\cache\@eslint-eslintrc-npm-2.1.2-feb0771c9f-fa25638f26.zip\node_modules\@eslint\eslintrc\dist\eslintrc.cjs
Occurred while linting C:\Users\zach\Downloads\bots test\test_bug\src\index.ts:1
Rule: "prettier/prettier"
at require$$0.Module._resolveFilename (C:\Users\zach\Downloads\bots test\test_bug\.pnp.cjs:10265:13)
at Function.resolve (node:internal/modules/helpers:136:19)
at C:\Users\zach\Downloads\bots test\test_bug\.yarn\cache\synckit-npm-0.8.5-40a594eb38-fb6798a2db.zip\node_modules\synckit\lib\index.cjs:174:92
at Array.some (<anonymous>)
at setupTsRunner (C:\Users\zach\Downloads\bots test\test_bug\.yarn\cache\synckit-npm-0.8.5-40a594eb38-fb6798a2db.zip\node_modules\synckit\lib\index.cjs:173:68)
at startWorkerThread (C:\Users\zach\Downloads\bots test\test_bug\.yarn\cache\synckit-npm-0.8.5-40a594eb38-fb6798a2db.zip\node_modules\synckit\lib\index.cjs:205:7)
at Object.createSyncFn (C:\Users\zach\Downloads\bots test\test_bug\.yarn\cache\synckit-npm-0.8.5-40a594eb38-fb6798a2db.zip\node_modules\synckit\lib\index.cjs:76:18)
at Program (C:\Users\zach\Downloads\bots test\test_bug\.yarn\__virtual__\eslint-plugin-prettier-virtual-9c990f1546\0\cache\eslint-plugin-prettier-npm-5.0.0-2f21113cba-4ea0e5f82a.zip\node_modules\eslint-plugin-prettier\eslint-plugin-prettier.js:147:51)
at ruleErrorHandler (C:\Users\zach\Downloads\bots test\test_bug\.yarn\cache\eslint-npm-8.47.0-84c6b60ea8-f3f9c68631.zip\node_modules\eslint\lib\linter\linter.js:1050:28)
at C:\Users\zach\Downloads\bots test\test_bug\.yarn\cache\eslint-npm-8.47.0-84c6b60ea8-f3f9c68631.zip\node_modules\eslint\lib\linter\safe-emitter.js:45:58
Oops! Something went wrong! :(

ESLint: 8.47.0

Error: synckit tried to access "C:, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

Required package: "C: (via ""C:\Users\zach\Downloads\bots")
Required by: synckit@npm:0.8.5 (via C:\Users\zach\Downloads\bots test\test_bug\.yarn\cache\synckit-npm-0.8.5-40a594eb38-fb6798a2db.zip\node_modules\synckit\lib\)

Require stack:
- C:\Users\zach\Downloads\bots test\test_bug\.yarn\cache\synckit-npm-0.8.5-40a594eb38-fb6798a2db.zip\node_modules\synckit\lib\index.cjs
- C:\Users\zach\Downloads\bots test\test_bug\.yarn\__virtual__\eslint-plugin-prettier-virtual-9c990f1546\0\cache\eslint-plugin-prettier-npm-5.0.0-2f21113cba-4ea0e5f82a.zip\node_modules\eslint-plugin-prettier\eslint-plugin-prettier.js
- C:\Users\zach\Downloads\bots test\test_bug\.yarn\cache\@eslint-eslintrc-npm-2.1.2-feb0771c9f-fa25638f26.zip\node_modules\@eslint\eslintrc\dist\eslintrc.cjs
Occurred while linting C:\Users\zach\Downloads\bots test\test_bug\src\index.ts:1
Rule: "prettier/prettier"
at require$$0.Module._resolveFilename (C:\Users\zach\Downloads\bots test\test_bug\.pnp.cjs:10265:13)
at Function.resolve (node:internal/modules/helpers:136:19)
at C:\Users\zach\Downloads\bots test\test_bug\.yarn\cache\synckit-npm-0.8.5-40a594eb38-fb6798a2db.zip\node_modules\synckit\lib\index.cjs:174:92
at Array.some (<anonymous>)
at setupTsRunner (C:\Users\zach\Downloads\bots test\test_bug\.yarn\cache\synckit-npm-0.8.5-40a594eb38-fb6798a2db.zip\node_modules\synckit\lib\index.cjs:173:68)
at startWorkerThread (C:\Users\zach\Downloads\bots test\test_bug\.yarn\cache\synckit-npm-0.8.5-40a594eb38-fb6798a2db.zip\node_modules\synckit\lib\index.cjs:205:7)
at Object.createSyncFn (C:\Users\zach\Downloads\bots test\test_bug\.yarn\cache\synckit-npm-0.8.5-40a594eb38-fb6798a2db.zip\node_modules\synckit\lib\index.cjs:76:18)
at Program (C:\Users\zach\Downloads\bots test\test_bug\.yarn\__virtual__\eslint-plugin-prettier-virtual-9c990f1546\0\cache\eslint-plugin-prettier-npm-5.0.0-2f21113cba-4ea0e5f82a.zip\node_modules\eslint-plugin-prettier\eslint-plugin-prettier.js:147:51)
at ruleErrorHandler (C:\Users\zach\Downloads\bots test\test_bug\.yarn\cache\eslint-npm-8.47.0-84c6b60ea8-f3f9c68631.zip\node_modules\eslint\lib\linter\linter.js:1050:28)
at C:\Users\zach\Downloads\bots test\test_bug\.yarn\cache\eslint-npm-8.47.0-84c6b60ea8-f3f9c68631.zip\node_modules\eslint\lib\linter\safe-emitter.js:45:58
wait oh my god nevermind i fixed the issue, there was a space in the folder though file explorer had no space nvm lmao sorry
Want results from more Discord servers?
Add your server