parcel
parcel copied to clipboard
Unstable breaking builds
🐛 bug report
The build result sometimes works and sometimes breaks.
When it breaks it reports, that the function select
select is undefined, which get's imported from node module d3
.
I apologise if similar bugs have already been reported. Such instabilities are quite unspecific by nature, so that specific search terms are missing.
🎛 Configuration (.babelrc, package.json, cli command)
It's the configuration of this commit: https://github.com/home-assistant-tutorials/20.mermaid-card/commit/02e83b52475545bc7f663bde3142c52479ef8383
{
"source": "src/index.js",
"module": "dist/card.js",
"targets": {
"module": {
"includeNodeModules": true
}
},
"scripts": {
"watch": "parcel watch",
"build": "parcel build"
},
"devDependencies": {
"parcel": "^2.8.3"
},
"dependencies": {
"lit": "^2.7.4",
"mermaid": "^10.2.3"
}
}
🤔 Expected Behavior
😯 Broken Behavior
In the moment the behaviour does not happen as I want to copy the stack trace.
💁 Possible Solution
Sometimes it helps, to just run npm run build
again. Sometimes it helps to delete .parcel-cache/
and dist/
before.
🔦 Context
I am running the code inside a docker container on a recent Mac. The directory is mounted. There could be writing instabilities during generation, although I don't observe complaints of a missing file.
The code is called inside a Lit
based HTML custom element so inside a shadow DOM as well.
🌍 Your Environment
See repository. Mac Mini 2023. Docker desktop 4.19.0.
I am experiencing a similar problem with Parcel 2.9.2+. The minified build/dist output differs from that served through the dev server. The dist output is missing a symbol for react-router which breaks the entire app. Meanwhile everything works properly while serving with the dev server.
Our app builds correctly with 2.8.1, so I assume this bug was introduced in 2.9.x!
Please provide a small code sample that reproduces the issue.