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
Add in as a dependency: vite-plugin-node-polyfills and add to vite plugins.
The error will show up:
[plugin:vite-plugin-zero-runtime] ENOENT: no such file or directory, open '/Users/paul/development/src/github/pigment-vite/node_modules/.vite/deps/vite-plugin-node-polyfills_shims_buffer.js'
Current behavior
Crashes with error.
14:33:37 [vite] (client) Pre-transform error: ENOENT: no such file or directory, open '/Users/paul/development/src/github/pigment-vite/node_modules/.vite/deps/vite-plugin-node-polyfills_shims_buffer.js'
Plugin: vite-plugin-zero-runtime
File: /Users/paul/development/src/github/pigment-vite/src/App.tsx
14:33:37 [vite] (client) ✨ new dependencies optimized: vite-plugin-node-polyfills/shims/buffer, vite-plugin-node-polyfills/shims/global, vite-plugin-node-polyfills/shims/process
14:33:37 [vite] (client) ✨ optimized dependencies changed. reloading
14:33:37 [vite] Internal server error: ENOENT: no such file or directory, open '/Users/paul/development/src/github/pigment-vite/node_modules/.vite/deps/vite-plugin-node-polyfills_shims_buffer.js'
Plugin: vite-plugin-zero-runtime
File: /Users/paul/development/src/github/pigment-vite/src/App.tsx
at readFileSync (node:fs:441:20)
at Object.loadAndParse [as loadAndParseFn] (/Users/paul/development/src/github/pigment-vite/node_modules/@wyw-in-js/transform/lib/transform/Entrypoint.helpers.js:119:97)
at new Entrypoint (/Users/paul/development/src/github/pigment-vite/node_modules/@wyw-in-js/transform/lib/transform/Entrypoint.js:40:112)
at Entrypoint.innerCreate (/Users/paul/development/src/github/pigment-vite/node_modules/@wyw-in-js/transform/lib/transform/Entrypoint.js:129:27)
at /Users/paul/development/src/github/pigment-vite/node_modules/@wyw-in-js/transform/lib/transform/Entrypoint.js:85:47
at EventEmitter.perf (/Users/paul/development/src/github/pigment-vite/node_modules/@wyw-in-js/transform/lib/utils/EventEmitter.js:45:20)
at Entrypoint.create (/Users/paul/development/src/github/pigment-vite/node_modules/@wyw-in-js/transform/lib/transform/Entrypoint.js:84:25)
at Entrypoint.createChild (/Users/paul/development/src/github/pigment-vite/node_modules/@wyw-in-js/transform/lib/transform/Entrypoint.js:176:23)
at BaseAction.processImports (/Users/paul/development/src/github/pigment-vite/node_modules/@wyw-in-js/transform/lib/transform/generators/processImports.js:22:44)
at processImports.next (<anonymous>)
at /Users/paul/development/src/github/pigment-vite/node_modules/@wyw-in-js/transform/lib/transform/actions/BaseAction.js:66:78
at EventEmitter.action (/Users/paul/development/src/github/pigment-vite/node_modules/@wyw-in-js/transform/lib/utils/EventEmitter.js:25:22)
at BaseAction.emitAction (/Users/paul/development/src/github/pigment-vite/node_modules/@wyw-in-js/transform/lib/transform/actions/BaseAction.js:131:39)
at nextFn (/Users/paul/development/src/github/pigment-vite/node_modules/@wyw-in-js/transform/lib/transform/actions/BaseAction.js:66:32)
at processNext (/Users/paul/development/src/github/pigment-vite/node_modules/@wyw-in-js/transform/lib/transform/actions/BaseAction.js:111:28)
at Object.next (/Users/paul/development/src/github/pigment-vite/node_modules/@wyw-in-js/transform/lib/transform/actions/BaseAction.js:120:9)
at asyncActionRunner (/Users/paul/development/src/github/pigment-vite/node_modules/@wyw-in-js/transform/lib/transform/actions/actionRunner.js:39:102)
at asyncActionRunner (/Users/paul/development/src/github/pigment-vite/node_modules/@wyw-in-js/transform/lib/transform/actions/actionRunner.js:46:28)
at async asyncActionRunner (/Users/paul/development/src/github/pigment-vite/node_modules/@wyw-in-js/transform/lib/transform/actions/actionRunner.js:46:22)
at async asyncActionRunner (/Users/paul/development/src/github/pigment-vite/node_modules/@wyw-in-js/transform/lib/transform/actions/actionRunner.js:46:22)
at async Object.transform (/Users/paul/development/src/github/pigment-vite/node_modules/@wyw-in-js/transform/lib/transform.js:107:20)
at async TransformPluginContext.transform (/Users/paul/development/src/github/pigment-vite/node_modules/@pigment-css/vite-plugin/build/index.js:168:24)
at async EnvironmentPluginContainer.transform (file:///Users/paul/development/src/github/pigment-vite/node_modules/vite/dist/node/chunks/dep-yUJfKD1i.js:47001:18)
at async loadAndTransform (file:///Users/paul/development/src/github/pigment-vite/node_modules/vite/dist/node/chunks/dep-yUJfKD1i.js:40852:27)
Expected behavior
Adding nodePolyfills should not impact pigment-css at all.
Context
I'm running Electron. I'm coming across the issue where process and other node functions are not available.
Using nodePolyfills solves this issue.
Your environment
No response
Search keywords: nodePolyfills
The text was updated successfully, but these errors were encountered:
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.
Note
@paulm17 How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey.
Steps to reproduce
Clone: https://github.com/paulm17/pigment-vite
yarn
yarn dev
Create a simple vite app, add in pigment-css.
Add in as a dependency:
vite-plugin-node-polyfills
and add to vite plugins.The error will show up:
Current behavior
Crashes with error.
Expected behavior
Adding nodePolyfills should not impact pigment-css at all.
Context
I'm running Electron. I'm coming across the issue where process and other node functions are not available.
Using nodePolyfills solves this issue.
Your environment
No response
Search keywords: nodePolyfills
The text was updated successfully, but these errors were encountered: