Parcel 2 - asset not found
See original GitHub issue🐛 bug report
With a cold build, everything completes fine. Rerunning with a warm cache causes Parcel to fail with “asset not found” during the bundling phase. These assets do exist at their asset.filePath
, so the path is correct.
Error: Asset not found
at BundleGraph.getDependencies (@parcel/core/lib/BundleGraph.js:257:13)
at BundleGraph.getDependencies (@parcel/core/lib/public/BundleGraph.js:91:48)
at @parcel/reporter-hmr-server/lib/HMRServer.js:98:44
at Array.map (<anonymous>)
at HMRServer.emitUpdate (@parcel/reporter-hmr-server/lib/HMRServer.js:97:50)
🎛 babel.config.js
module.exports = function(api) {
api.cache(true)
const babelConfig = {
presets: [
[
'@babel/env',
{
targets: { chrome: '58', ie: '11' },
modules: 'commonjs',
useBuiltIns: 'usage',
corejs: 3,
},
],
'@babel/preset-typescript',
],
plugins: [
'babel-plugin-add-module-exports',
'babel-plugin-transform-dynamic-import',
'angularjs-annotate',
'dynamic-import-node',
'@babel/plugin-proposal-class-properties',
'@babel/plugin-transform-async-to-generator',
['@babel/plugin-transform-runtime', { regenerator: false }],
],
compact: false,
inputSourceMap: true,
sourceMaps: true,
}
return babelConfig
}
💁 Possible Solution
I haven’t dug this far yet. I need to check the nodes
Map
in Graph
to see if they exist there which might tell me if the asset.id
is incorrect.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Assets - Parcel
Parcel is based around assets. An asset can represent any file, but Parcel has special support for certain types of assets like JavaScript,...
Read more >Importing non-code asset (.png) from Javascript in Parcel 2 ...
Since Parcel bundles without issues, I am assuming this is related to some missing TypeScript configuration. Would you please confirm this?
Read more >parcel - npm
Out of the box support for JS, CSS, HTML, file assets, and more - no plugins to install. Automatically transforms modules using Babel, ......
Read more >How to Bundle a Web App with Parcel.js - DigitalOcean
With the Parcel bundler installed as a local dependency, you're now ready to start working on your application. Step 2 — Creating the ......
Read more >Untitled
Out of the box support for JS, CSS, HTML, file assets, and more - **no plugins to install**. ... or with npm: ```shell...
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
Related: https://github.com/parcel-bundler/parcel/issues/4356 I get the same error now after updating some packages and reinstalling node_modules.
Starting parcel with
--no-hmr
fixes the issue.Parcel ran fine after installation but is showing this error when I started it the other day. Any Help Appreciated.