question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

throw `Error: ENOENT: no such file or directory, stat '...'` when using Vite

See original GitHub issue

First thanks for your great work, it is very easy to use!

My only problem is when I start a Vite server, there will throw many Error: ENOENT: no such file or directory, stat '...' errors.

I found the reason is because the npm publish has include .map files and the mapping .ts files do not include.

I see you have add .js.map to .gitignore now, but not enough. if "sourceMap": true is set, there will add a line like //# sourceMappingURL=assert.js.map to .js files, so there still has .map files not found errors, you must to disable sourceMap option for publish.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
timostammcommented, Dec 16, 2020

The fix has been back-ported in v1.0.12

1reaction
timostammcommented, Nov 27, 2020

@johnsoncodehk, source mappings have been removed in prerelease version v2.0.0-alpha.2.

If this does not fix the issue, please reopen.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: ENOENT: no such file or directory, stat ... .steampath
This issue is caused because of some missing dependencies. The dependencies which were missing were not listed in the package ...
Read more >
How to fix: npm ERR! enoent ENOENT: no such file or ...
I recently struggled for a while with an npm error thrown when executing npm install of some package. The error message was npm...
Read more >
ENOENT No Such File or Directory Open - YouTube
In This Video We Will See How to Fix npm ERR Code ENOENT npm ERR syscall Open Error or ENOENT No Such File...
Read more >
Error: ENOENT: no such file or directory, scandir ... - YouTube
nodejsError: ENOENT : no such file or directory, scandir '**/node_modules/node-sass/vendor' | Module build failed (from .
Read more >
Resolve npm WARN saveError ENOENT no such file or ...
To resolve the ENOENT warning message, you need to add a package.json file in the directory where you run the npm install command....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found