parcel: Parcel crashes with `Error: ENOENT: no such file or directory,` when using `--detailed-report`
🐛 bug report
The following command: parcel build --detailed-report 40 src/main.ts
makes parcel crash
🎛 Configuration (.babelrc, package.json, cli command)
{
"devDependencies": {
"parcel": "nightly"
},
"targets": {
"newest": {
"engines": {
"browsers": "last 1 firefox version"
}
}
},
"scripts": {
"build": "parcel build --detailed-report 40 src/main.ts"
}
}
🤔 Expected Behavior
Parcel should build successfully
😯 Current Behavior
[Error: ENOENT: no such file or directory, open '/private/tmp/parcel/dist/main.js'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/private/tmp/parcel/dist/main.js'
}
💁 Possible Solution
Dunno 🤷♂️
🔦 Context
Updated my dependencies to figure out if it fixes https://github.com/babel/babel/issues/14345.
After installing process
and figuring out that my builds randomly fail because I’m missing
"alias": {
"process": {
"global": "process"
}
},
In my package.json
I got this error and narrowed it down to --detailed-report
💻 Code Sample
Run yarn install
and yarn build
🌍 Your Environment
Software | Version(s) |
---|---|
Parcel | 2.0.0-nightly.1008+493fda27e |
Node | v17.6.0 |
npm/Yarn | 3.2. |
Operating System | macOS 12.2 (21D49) |
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 11
- Comments: 32 (8 by maintainers)
same problem for months now… so annoying
Hi, I often get this error when using
parcel watch
. During the watch (run with commandnpx parcel watch --dist-dir ../MyWebApp/wwwroot/SaasScripts --no-cache
) , it randomly fails with this error:Sometimes the only solution is to do
git clean -fdx
and reinstall all npm packages/rebuilt everything, which is very frustrating and time-consuming…I’m on parcel
2.7.0
Any news on that issue?
Until Parcel can resolve this error, I think Vite is the easiest alternative right now.
I have the same issue.
Is this project still alive? A basic feature like watch is not working and this issue is open for a year…
Same- I’ve had this problem too. I feel let down by Parcel- it’s very frustrating, and I am not very happy with Parcel. Please, please fix this issue- I can’t do anything without constantly rebuilding manually. What’s the point of
parcel watch
if it builds once and throws an error?I tried it now, breaks as expected.
The project is entirely clean though. No old cache files. The development mode works fine. It’s just the build that throws an error. I’ll try to reproduce it with a demo project and send you the code.
Got the same Issue on Windows 10, node v17.8.0, npm 8.5.5, parcel 2.4.0 & 2.4.1. I also use
--detailed-report --reporter @parcel/reporter-bundle-analyzer
Hint: The build itself works fine, just the error appears instead of a detailed report.