Unexpected EOF at line 1 column 2 of the JSON5 data. Still to read: ""
See original GitHub issue🐛 Bug Report
🎛 Configuration (.babelrc, package.json, cli command)
.babelrc
{
"presets": ["env"]
}
package.json
{
"name": "irbo",
"version": "1.0.0",
"main": "server.js",
"license": "MIT",
"devDependencies": {
"autoprefixer": "^8.0.0",
"babel-preset-env": "^1.6.1",
"cross-env": "^5.1.3",
"nodemon": "^1.14.12",
"parcel-bundler": "^1.5.1",
"stylus": "^0.54.5"
},
"dependencies": {
"babel-polyfill": "^6.26.0"
},
"scripts": {
"dev": "parcel client/index.html",
"dev-with-server": "cross-env NODE_ENV=development parcel watch client/index.html",
"test": "cross-env NODE_ENV=test",
"prod": "cross-env NODE_ENV=production parcel build client/index.html --out-dir public --public-url ./"
}
}
🤔 Expected Behavior
The expected behavior is that the files should parse correctly and a dev server should spin up.
I am new to Parcel and am just testing out some of the basic configurations. I am not trying anything too complex right now.
😯 Current Behavior
I have a blank index.html file with a CSS and a JS file linked in. When I initially ran yarn run dev, everything was fine. But after I changed the content in the index.html file, I got this error:
/home/path/to/file/index.html: Unexpected EOF at line 1 column 2 of the JSON5 data. Still to read: ""
at error (/home/path/to/file/node_modules/json5/lib/json5.js:56:25)
at word (/home/path/to/file/node_modules/json5/lib/json5.js:393:13)
at value (/home/path/to/file/node_modules/json5/lib/json5.js:493:56)
at /home/path/to/file/node_modules/json5/lib/json5.js:508:18
at Object.load (/home/path/to/file/node_modules/parcel-bundler/src/utils/config.js:44:14)
at <anonymous>
💁 Possible Solution
I have no idea. It appears to be a problem with Parcel, but I am not certain about that.
🔦 Context
I am just learning Parcel and trying to test some different configurations.
💻 Code Sample
Bitbucket repo: https://bitbucket.org/samwell/irbo/src
🌍 Your Environment
Parcel: 1.5.1 (local installation instead of global) Node: 8.9.4 npm: 5.6.0 Yarn: 1.3.2 OS: Ubuntu 16.04
Issue Analytics
- State:
- Created 6 years ago
- Comments:5

Top Related StackOverflow Question
I had the same error as a result of having an empty
file
I found the problem. I had a blank
.posthtmlrcfile in my project root that was throwing the error. As soon as I removed the file the error went away. When I created a new, blank.posthtmlrcfile the error came back.All is good in the world again!
I am loving Parcel! Keep up the good work!