Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vite build crashes with yarn pnp on windows #13158

Closed
7 tasks done
DiFuks opened this issue May 11, 2023 · 1 comment · Fixed by #13160
Closed
7 tasks done

Vite build crashes with yarn pnp on windows #13158

DiFuks opened this issue May 11, 2023 · 1 comment · Fixed by #13160
Labels
p3-minor-bug An edge case that only affects very specific usage (priority) regression The issue only appears after a new release

Comments

@DiFuks
Copy link

DiFuks commented May 11, 2023

Describe the bug

I am running vite build on windows with yarn pnp. I am getting this error. I am running vite build on windows with yarn pnp. I am getting such an error. With vite 3.2.2 there is no error:

Click to expand!
PS C:\git\dodo\kiosk\src\frontend> yarn build
vite v4.3.4 building for production...
✓ 1 modules transformed.
✓ built in 54ms
[commonjs--resolver] ENOENT: no such file or directory, open 'C:\package.json'
node:fs:601
  handleErrorFromBinding(ctx);
  ^

Error: ENOENT: no such file or directory, open 'C:\package.json'
    at Object.openSync (node:fs:601:3)
    at NodeFS.openSync (C:\git\dodo\kiosk\src\frontend.pnp.cjs:12140:24)
    at makeCallSync.subPath.subPath (C:\git\dodo\kiosk\src\frontend.pnp.cjs:14200:26)
    at ZipOpenFS.makeCallSync (C:\git\dodo\kiosk\src\frontend.pnp.cjs:14831:14)
    at ZipOpenFS.openSync (C:\git\dodo\kiosk\src\frontend.pnp.cjs:14199:17)
    at VirtualFS.openSync (C:\git\dodo\kiosk\src\frontend.pnp.cjs:13787:24)
    at PosixFS.openSync (C:\git\dodo\kiosk\src\frontend.pnp.cjs:13787:24)
    at NodePathFS.openSync (C:\git\dodo\kiosk\src\frontend.pnp.cjs:13787:24)
    at Object.readFileSync (node:fs:469:35)
    at NodeFS.readFileSync (C:\git\dodo\kiosk\src\frontend.pnp.cjs:12435:24) {
  errno: -4058,
  syscall: 'open',
  code: 'PLUGIN_ERROR',
  path: 'C:\\package.json',
  pluginCode: 'ENOENT',
  plugin: 'commonjs--resolver',
  hook: 'resolveId',
  watchFiles: [
    'C:/git/dodo/kiosk/src/frontend/src/app/singleSpa.tsx',
    'C:\\git\\dodo\\kiosk\\src\\frontend\\package.json',
    'C:/git/dodo/kiosk/src/frontend/src/app/App.tsx',
    'C:/git/dodo/kiosk/src/frontend/src/shared/lib/logger.ts',
    'C:/git/dodo/kiosk/src/frontend/src/shared/ui/AppError/AppError.tsx',
    'C:/git/dodo/kiosk/src/frontend/src/shared/config/i18n.ts'
  ]
}

Node.js v18.16.0

Reproduction

https://github.com/DiFuks/vite-pnp-windows-issue

Steps to reproduce

No response

System Info

System:
    OS: Windows 10 10.0.22621
    CPU: (12) x64 Intel(R) Core(TM) i5-10400 CPU @ 2.90GHz
    Memory: 31.95 GB / 63.75 GB
  Binaries:
    Node: 18.16.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 3.5.1 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 8.0.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.22621.1702.0), Chromium (113.0.1774.35)
    Internet Explorer: 11.0.22621.1

Used Package Manager

yarn

Logs

No response

Validations

@DiFuks
Copy link
Author

DiFuks commented May 11, 2023

@sapphi-red sapphi-red added p3-minor-bug An edge case that only affects very specific usage (priority) regression The issue only appears after a new release labels May 11, 2023
@github-actions github-actions bot locked and limited conversation to collaborators May 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p3-minor-bug An edge case that only affects very specific usage (priority) regression The issue only appears after a new release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants