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
When using a .proxyrc.js file in a project that uses yarn pnp module resolution, Parcel throws exceptions when starting the dev server with parcel 2.9.
β workspace git:(master) β yarn start | cat
TypeError: Cannot read properties of null (reading 'resolveToUnqualified')
at NodePackageManager.resolveInternal (/project/home/itaylor/workspace/.yarn/__virtual__/@parcel-package-manager-virtual-032b6d7d29/2/.cache/yarn/@parcel-package-manager-npm-2.9.1-c7a23c41b1-849d334663.zip/node_modules/@parcel/package-manager/lib/index.js:3669:49)
at NodePackageManager.resolve (/project/home/itaylor/workspace/.yarn/__virtual__/@parcel-package-manager-virtual-032b6d7d29/2/.cache/yarn/@parcel-package-manager-npm-2.9.1-c7a23c41b1-849d334663.zip/node_modules/@parcel/package-manager/lib/index.js:3443:33)
at NodePackageManager.require (/project/home/itaylor/workspace/.yarn/__virtual__/@parcel-package-manager-virtual-032b6d7d29/2/.cache/yarn/@parcel-package-manager-npm-2.9.1-c7a23c41b1-849d334663.zip/node_modules/@parcel/package-manager/lib/index.js:3374:47)
at $72a0cbc70345a858$export$2e2bcd8739ae039.applyProxyTable (/project/home/itaylor/.cache/yarn/@parcel-reporter-dev-server-npm-2.9.1-83db12068f-9fcbf33992.zip/node_modules/@parcel/reporter-dev-server/lib/ServerReporter.js:16867:57)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async $72a0cbc70345a858$export$2e2bcd8739ae039.start (/project/home/itaylor/.cache/yarn/@parcel-reporter-dev-server-npm-2.9.1-83db12068f-9fcbf33992.zip/node_modules/@parcel/reporter-dev-server/lib/ServerReporter.js:16898:9)
at async Object.report (/project/home/itaylor/.cache/yarn/@parcel-reporter-dev-server-npm-2.9.1-83db12068f-9fcbf33992.zip/node_modules/@parcel/reporter-dev-server/lib/ServerReporter.js:17330:43)
at async ReporterRunner.report (/project/home/itaylor/.cache/yarn/@parcel-core-npm-2.9.1-f045126896-a63a341127.zip/node_modules/@parcel/core/lib/ReporterRunner.js:98:11)
at async Parcel.watch (/project/home/itaylor/.cache/yarn/@parcel-core-npm-2.9.1-f045126896-a63a341127.zip/node_modules/@parcel/core/lib/Parcel.js:239:7)
at async run (/project/home/itaylor/workspace/.yarn/__virtual__/parcel-virtual-a111aa5f57/2/.cache/yarn/parcel-npm-2.9.1-09338b9340-9ad2ffd95a.zip/node_modules/parcel/lib/cli.js:286:9)
Run yarn start | cat in the codesandbox terminal to repro the problem.
remove the .proxyrc.js file, and rerun, and parcel starts fine. Downgrade parcel to 2.8.3 and it also works fine.
π€ Expected Behavior
.proxyrc.js should be supported regardless of package manager.
π Possible Solution
I believe that the pnp context is not being set up properly for resolution of the .proxyrc.js (and perhaps also for other js config files). This problem likely came in with the new Resolver in 2.9.
π bug report
When using a
.proxyrc.js
file in a project that uses yarn pnp module resolution, Parcel throws exceptions when starting the dev server with parcel 2.9.This did not occur with parcel 2.8.3.
Here's a link to a codesandbox that repros the issue.
https://codesandbox.io/p/sandbox/youthful-neumann-4biw3m?file=%2F.proxyrc.js%3A6%2C9
Run
yarn start | cat
in the codesandbox terminal to repro the problem.remove the
.proxyrc.js
file, and rerun, and parcel starts fine. Downgrade parcel to 2.8.3 and it also works fine.π€ Expected Behavior
.proxyrc.js
should be supported regardless of package manager.π Possible Solution
I believe that the pnp context is not being set up properly for resolution of the
.proxyrc.js
(and perhaps also for other js config files). This problem likely came in with the new Resolver in 2.9.π» Code Sample
https://codesandbox.io/p/sandbox/youthful-neumann-4biw3m?file=%2F.proxyrc.js%3A6%2C9
π Your Environment
The text was updated successfully, but these errors were encountered: