jw-12138 / vite-plugin-vsharp

Compress Images for the Web with Vite and Sharp
MIT License
43 stars 0 forks source link

No loader is configured for ".node" #11

Closed keuller closed 1 year ago

keuller commented 1 year ago

Environment

Error

When I ran pnpm devon Nuxt project I got this error:

 ERROR  6:35:17 PM [vite] error while updating dependencies:                                                                                          18:35:17
Error: Build failed with 1 error:
node_modules/.pnpm/fsevents@2.3.2/node_modules/fsevents/fsevents.js:13:23: ERROR: No loader is configured for ".node" files: node_modules/.pnpm/fsevents@2.3.2/node_modules/fsevents/fsevents.node

When I ran pnpm build vshaprt plugin does not find the assets, even the resources exists on the specified path.

[unhandledRejection] Input file is missing: /workspace/personal/resumeapp/.nuxt/dist/server/start-yellow.png
jw-12138 commented 1 year ago

could you please provide the file/folder structure or an example project?

keuller commented 1 year ago

Yes, my structure folder is:

[resumeapp]
  - assets
     - check.jpg
     - share.png
     - start-yellow.png
  - pages
     - index.vue 
  - public
     - favicon.ico
jw-12138 commented 1 year ago

it appears that the issue at hand is connected to esbuild, pnpm and sharp. as a Vite plugin developer, my assistance may be limited. however, I can offer some guidance.

You may want to take a look at this issue on GitHub: https://github.com/evanw/esbuild/issues/1051

especially this comment: https://github.com/evanw/esbuild/issues/1051#issuecomment-1006992549

I wish this could help you!