-
Notifications
You must be signed in to change notification settings - Fork 132
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
throw Error: ENOENT: no such file or directory, stat '...'
when using Vite
#38
Comments
Thanks for the feedback, @johnsoncodehk I did a (I removed all source files except "assert") just to make it a bit easier. Looking at // code omitted
//# sourceMappingURL=assert.js.map
// code omitted
//# sourceMappingURL=assert.js.map
// declarations omitted
//# sourceMappingURL=assert.d.ts.map All files referenced by
So the problem seems to be Could you verify if your error goes away if you add the .ts source files? If this fixes your error, I will add the files to the published packages. |
Yes current release version have
so I guess I already remove Yes if you add And thanks you work again! |
Yes, but there also is a .npmignore. This means .gitignore does not matter for npm publish.
Seems like there is no definite answer, see googleapis/google-cloud-node#2867 for example. But I think I prefer removing source maps instead of adding typescript sources. I'll give it some more thought. Let's keep this issue open as a reminder. |
Yes I think removing source maps is better too! (may be some misunderstanding before) |
@johnsoncodehk, source mappings have been removed in prerelease version v2.0.0-alpha.2. If this does not fix the issue, please reopen. |
The fix has been back-ported in v1.0.12 |
I already using 2.x, thanks! |
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.The text was updated successfully, but these errors were encountered: