ckeditor5 icon indicating copy to clipboard operation
ckeditor5 copied to clipboard

Failed to resolve `process` while compiling using `Parcel`

Open Mati365 opened this issue 1 year ago • 2 comments

📝 Provide detailed reproduction steps (if any)

  1. Extract package.zip bundle
  2. Install dependencies npm install
  3. Run Parcel build npx 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.

Mati365 avatar Jun 06 '24 11:06 Mati365

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"
  }
}

Mati365 avatar Jun 06 '24 11:06 Mati365

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.

CKEditorBot avatar Jun 10 '25 23:06 CKEditorBot

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).

CKEditorBot avatar Jul 11 '25 23:07 CKEditorBot