unplugin-icons icon indicating copy to clipboard operation
unplugin-icons copied to clipboard

Failed to read source code from /vercel/path0/_virtual_~icons/mdi/instagram.jsx

Open SSardorf opened this issue 2 years ago • 15 comments

I get this when building on Vercel, and sometimes locally (using Nextjs). Redeploying usually fixes the issue

./_virtual_~icons/mdi/instagram.jsx
--
17:44:39.823 | Error: Failed to read source code from /vercel/path0/_virtual_~icons/mdi/instagram.jsx
17:44:39.824 |  
17:44:39.824 | Caused by:
17:44:39.824 | No such file or directory (os error 2)

SSardorf avatar May 30 '22 15:05 SSardorf

Same here. Super annoying. Have to remove node_modules and reinstall every time this happens.

didier avatar Jul 12 '22 12:07 didier

Should note: even that doesn't consistently fix it.

didier avatar Jul 19 '22 11:07 didier

I'm also getting this constantly on build—locally or to Vercel. I'm using SvelteKit. Everything works great in development, rebuilding doesn't fix it.

Screen Shot 2022-08-02 at 11 34 47 PM

silasabbott avatar Aug 03 '22 06:08 silasabbott

I have the same issue from time to time with Nextjs locally. A fix for me is to delete the .next folder and then rerun yarn run dev.

langlukas avatar Aug 15 '22 19:08 langlukas

Using virtual:icons instead of ~icons to reference icons has seemed to fix it for me.

silasabbott avatar Aug 16 '22 21:08 silasabbott

I met this kind of error with webpack --watch first, then I exit webpack then execute it again, the error did not resurface again.

scil avatar Sep 03 '22 05:09 scil

encountered repeatly. I remove dir node_modules and tentatively remove this webpack config cacheDirectory: true.

hope it go well without this error.

scil avatar Sep 05 '22 22:09 scil

Any update on this? it's quite annoying, i have to delete the .next folder often to make this work.

AlbertoMontalesi avatar Mar 13 '23 12:03 AlbertoMontalesi

I have exactly the same issue with NextJs and it is truly annoying. The solution is to delete .next folder and re-run the dev command. The problem is that it happens absolutely randomly – after the 5th or 10th re-launch of a project, which may make reproducing it an unobvious, but still doable, task. I have arranged a reproduction on Stackblitz – https://stackblitz.com/edit/stackblitz-starters-arrh29?file=pages%2Findex.js.

  1. After opening it, finish the process with ctrl+c.
  2. Run npm run dev command, and kill it again.
  3. Repeat until getting the following result:
SCR-20230613-kudw

It took me 5 attempts to finally get the error.

wait  - compiling / (client and server)...
error - ./_virtual_~icons%2Fri%2Faliens-fill.jsx
ENOENT: no such file or directory, open '/home/projects/stackblitz-starters-arrh29/_virtual_~icons%2Fri%2Faliens-fill.jsx'

Need to note that on my local project, I have tried it with auto-import and it didn't fix the problem.

aalyokhin avatar Jun 13 '23 08:06 aalyokhin

@antfu can you fix this problem? as i see this bug very old

vitalibakhur avatar Aug 03 '23 08:08 vitalibakhur

Had this issue for the first time today, never had it before, retriggering the pipeline manually fixed it. It may be due to vercel build cache i suppose

brian-bourdon avatar Aug 31 '23 20:08 brian-bourdon

Same Problem. removing .next folder and running again will fix it. but the issue happens too much

Peyman-98 avatar Sep 26 '23 10:09 Peyman-98