Open pigrammer3 opened 7 months ago
I am having a similar problem when trying to install electron
for a VSCode extension, also on Windows 10:
# This file contains the result of Yarn building a package (electron@npm:32.0.2)
# Script name: postinstall
c:\Users\user\code\my-project\.pnp.cjs:10764
Error.captureStackTrace(firstError);
^
Error: The locator that owns the "/c:/Users/user/AppData/Local/Yarn/Berry/cache/extract-zip-npm-2.0.1-92a28e392b-10c0.zip/node_modules/extract-zip/" path can't be found inside the dependency tree (this is probably an internal error)
Require stack:
- c:\Users\user\code\my-project\.yarn\unplugged\electron-npm-32.0.2-869eb05173\node_modules\electron\install.js
at require$$0.Module._resolveFilename (c:\Users\user\code\my-project\.pnp.cjs:10764:13)
at Module._load (node:internal/modules/cjs/loader:1074:27)
at require$$0.Module._load (c:\Users\user\code\my-project\.pnp.cjs:10655:31)
at TracingChannel.traceSync (node:diagnostics_channel:315:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
at Module.require (node:internal/modules/cjs/loader:1339:12)
at require (node:internal/modules/helpers:135:16)
at Object.<anonymous> (c:\Users\user\code\my-project\.yarn\unplugged\electron-npm-32.0.2-869eb05173\node_modules\electron\install.js:9:17)
at Module._compile (node:internal/modules/cjs/loader:1546:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1691:10)
Node.js v22.8.0
Update: I was able to get it to work! π
bash
(which ships with git
on Windows).I have seen both causing weird problems when installing things or resolving paths in the past. And this time it happened again.
cmd
to install things instead.
Self-service
Describe the bug
I was building a package with TypeScript and Webpack, and decided to migrate from 1.x to 4.x and PnP. I did so, and got the following error (trace anonymized) (this error is not from my real project, it's from the MRE below):
I then ran
yarn add --dev import-local
to try to fix this, even though I did not actually use this package. I succeeded in getting a different error:I would appreciate if this could be fixed.
To reproduce
Package.json:
This happens the same whether I have
webpack.config.js
or whether I don't have it. It occurs even in an empty project with no source files.Environment
Additional context
No response