Failed to resolve `process` while compiling using `Parcel`
📝 Provide detailed reproduction steps (if any)
- Extract package.zip bundle
- Install dependencies
npm install - Run
Parcelbuildnpx parcel index.html
✔️ Expected result
Should compile without errors.
❌ Actual result
Throws Failed to resolve process
Server running at http://localhost:32829
🚨 Build failed.
@parcel/core: Failed to resolve 'process' from
'./node_modules/@ckeditor/ckeditor-cloud-services-collaboration/dist/index.js'
/home/mateusz/Projekty/cksource/new-installation-methods/parcel/node_modules/@ckeditor/ckeditor-cloud-services-collaboration/dist/index.js:27:29
❓ Possible solution
Polyfill process in Parcel.
📃 Other details
- OS: Fedora 40
If you'd like to see this fixed sooner, add a 👍 reaction to this post.
Found solution. Adding alias in package.json solves the issue. Example package.json:
{
"type": "module",
"dependencies": {
"@ckeditor/ckeditor5-react": "^8.0.0-alpha.0",
"buffer": "^6.0.3",
"ckeditor5": "^42.0.0-alpha.0",
"ckeditor5-premium-features": "^42.0.0-alpha.0",
"parcel": "^2.12.0"
},
"@parcel/resolver-default": {
"packageExports": true
},
"alias": {
"process": {
"global": "{}"
}
},
"devDependencies": {
"react": "^18.3.1",
"react-dom": "^18.3.1"
}
}
There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.
We've closed your issue due to inactivity. We understand that the issue may still be relevant. If so, feel free to open a new one (and link this issue to it).