@parcel/packager-html: Asset has no content
See original GitHub issue๐ bug report
After migrating from Parcel 1 (which had no errors),
parcel build ./html/prsm.html --public-url .
fails with Asset has no content error.
๐ Configuration (.babelrc, package.json, cli command)
parcel build ./html/prsm.html --public-url .
no .parcelrc
./html/prsm.html has 667 lines of HTML, including links to js modules
๐ค Expected Behavior
Successful bundling, as with Parcel 1
๐ฏ Current Behavior
Fails with
๐จ Build failed.
@parcel/packager-html: Asset has no content
Error: Asset has no content
at CommittedAsset.getContent (/Users/scs1ng/Sites/prsm/node_modules/@parcel/core/lib/CommittedAsset.js:99:15)
at CommittedAsset.getCode (/Users/scs1ng/Sites/prsm/node_modules/@parcel/core/lib/CommittedAsset.js:107:30)
at Asset.getCode (/Users/scs1ng/Sites/prsm/node_modules/@parcel/core/lib/public/Asset.js:204:48)
at /Users/scs1ng/Sites/prsm/node_modules/@parcel/packager-css/lib/CSSPackager.js:77:51
at /Users/scs1ng/Sites/prsm/node_modules/@parcel/utils/lib/PromiseQueue.js:53:30
at PromiseQueue._runFn (/Users/scs1ng/Sites/prsm/node_modules/@parcel/utils/lib/PromiseQueue.js:106:13)
at PromiseQueue._next (/Users/scs1ng/Sites/prsm/node_modules/@parcel/utils/lib/PromiseQueue.js:93:16)
at PromiseQueue.run (/Users/scs1ng/Sites/prsm/node_modules/@parcel/utils/lib/PromiseQueue.js:84:12)
at Object.package (/Users/scs1ng/Sites/prsm/node_modules/@parcel/packager-css/lib/CSSPackager.js:86:31)
at PackagerRunner.package (/Users/scs1ng/Sites/prsm/node_modules/@parcel/core/lib/PackagerRunner.js:346:27)
๐ Possible Solution
Donโt know
๐ฆ Context
๐ป Code Sample
package.json (extract):
"scripts": {
"lint": "./node_modules/.bin/eslint ./js/*.js --fix --quiet",
"pretty": "prettier --write ./html/*.html ./*.html ./js/*.js ./css/prsm.css doc/**/*.{html,css} package.json",
"dev": "parcel ./html/prsm.html",
"build1": "parcel build ./html/prsm.html --public-url . ",
"clean": "rm -rf dist/* out/*"
},
"dependencies": {
"@egjs/hammerjs": "^2.0.17",
"@joeattardi/emoji-button": "^2.12.1",
"component-emitter": "^1.3.0",
"fast-xml-parser": "^3.17.4",
"foodoc": "0.0.9",
"hammerjs": "^2.0.8",
"keycharm": "^0.3.1",
"moment": "^2.29.1",
"timsort": "^0.3.0",
"uuid": "^7.0.3",
"vis-data": "^6.6.1",
"vis-network": "^7.10.2",
"vis-util": "^4.3.4",
"y-indexeddb": "^9.0.5",
"y-websocket": "^1.3.6",
"yjs": "^13.4.2"
},
"devDependencies": {
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.15.0",
"jsdoc": "^3.6.6",
"parcel": "^2.0.0-nightly.438",
"prettier": "2.0.5"
},
๐ Your Environment
| Software | Version(s) |
|---|---|
| Parcel | 2.0.0-nightly.440 |
| Node | v14.15.0 |
| npm/Yarn | 6.14.8 |
| Operating System | 10.15.7 |
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:17 (6 by maintainers)
Top Results From Across the Web
HTML - Parcel
Parcel includes first-class support for HTML out of the box. HTML files are often the entry file that you provide to Parcel, and...
Read more >Getting Started With Parcel. Next Generation Web App Bundler
Bundle all your assets. Parcel offers out of the box support for common project assets like JS, CSS, HTML. You do not need...
Read more >Bundle your Web application with ParcelJS - codeburst
To bundle your project for production, you don't have to do any configuration or stress yourself, Parcel will automatically figure out all your...
Read more >How to Bundle a Web App with Parcel.js - DigitalOcean
In this tutorial, you will use Parcel to build and bundle a small web application that contains HTML, CSS, and JavaScript files.
Read more >parcel-bundler | Yarn - Package Manager
Out of the box support for JS, CSS, HTML, file assets, and more - no plugins to install. Automatically transforms modules using Babel,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Yeah! Deleting
.parcel-cache/did the trick - works now.Should be fixed, try a recent nightly.