parcel: `parcel serve` throws an error trying to read cache blob
๐ bug report
parcel serve after an indeterminate amount of time (sometimes immediately) will throw an error attempting to read a .blob file in the .parcel-cache directory.
๐ Configuration (.babelrc, package.json, cli command)
No babel config.
package.json as follows:
{
"name": "web",
"version": "1.0.0",
"description": "",
"main": "index.js",
"browserslist": [
"Chrome 78"
],
"scripts": {
"start": "parcel serve src/index.html",
"lint": "eslint \"**/*.jsx\"",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"babel-eslint": "^10.1.0",
"eslint": "^6.1.0",
"eslint-config-airbnb": "^18.0.1",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-react": "^7.19.0",
"eslint-plugin-react-hooks": "^3.0.0",
"parcel": "^2.0.0-nightly.225"
},
"dependencies": {
"@reduxjs/toolkit": "^1.2.3",
"@xstate/react": "^0.8.1",
"faker": "^4.1.0",
"feather-icons": "^4.26.0",
"firebase": "^7.14.0",
"fuse.js": "^5.1.0",
"polished": "^3.5.1",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-redux": "^7.1.3",
"react-router-dom": "^5.1.2",
"redux": "^4.0.5",
"redux-logger": "^3.0.6",
"redux-persist": "^6.0.0",
"styled-components": "^5.0.1",
"xstate": "^4.8.0"
}
}
๐ค Expected Behavior
parcel serve to read the cache blob correctly
๐ฏ Current Behavior
> parcel serve src/index.html
โน๏ธ Server running at http://localhost:1234
โ Optimizing web.[hash].js...
events.js:298
throw er; // Unhandled 'error' event
^
Error: ENOENT: no such file or directory, open '.parcel-cache/50/e8902ca6a84c52e55907a97e40c90b.blob'
Emitted 'error' event on ReadStream instance at:
at internal/fs/streams.js:163:14
at FSReqCallback.oncomplete (fs.js:154:23) {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '.parcel-cache/50/e8902ca6a84c52e55907a97e40c90b.blob'
}
I can see that the blob file does in-fact exist on disk once I see the error, but I canโt verify if itโs there before.
๐ฆ Context
Mostly itโs just an inconvenience.
Iโve found that:
- Re-running my start script tends to fix it, though not every time.
- Removing the .parcel-cache directory appears to be a consistent fix.
- Running
serve --no-cachedoesnโt remedy the problem.
๐ Your Environment
| Software | Version(s) |
|---|---|
| Parcel | 2.0.0-alpha.3.2 (also occurs with 2.0.0-nightly.225) |
| Node | 13.8.0 |
| npm | 6.13.6 |
| Operating System | macOS Mojave 10.14.4 |
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 4
- Comments: 18 (12 by maintainers)
This happens to me too, on OS X.
I run into the same issue on OS X (2.0.0-alpha.3.2).
Looks all good to me now ๐
Literally the files i sent in my comment, https://github.com/Banou26/parcel-bug-4495
Windows 10, 1909 Node v13.9.0
Can confirm @Banou26 's issue. Deleting cache does not have an effect.
Gonna revert to parcel 2.0.0-nightly.118, which works.