Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to resolve process while compiling using Parcel #16513

Open
Mati365 opened this issue Jun 6, 2024 · 1 comment
Open

Failed to resolve process while compiling using Parcel #16513

Mati365 opened this issue Jun 6, 2024 · 1 comment
Labels
type:bug This issue reports a buggy (incorrect) behavior.

Comments

@Mati365
Copy link
Member

Mati365 commented Jun 6, 2024

πŸ“ 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 Mati365 added type:bug This issue reports a buggy (incorrect) behavior. release:potential-blocker This issue potentially blocks the upcoming release (should be checked). labels Jun 6, 2024
@Mati365
Copy link
Member Author

Mati365 commented Jun 6, 2024

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

@Witoso Witoso removed the release:potential-blocker This issue potentially blocks the upcoming release (should be checked). label Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

No branches or pull requests

2 participants