nodegui / react-nodegui

Build performant, native and cross-platform desktop applications with native React + powerful CSS like styling.🚀
https://react.nodegui.org
MIT License
6.18k stars 171 forks source link

undefined symbol: _ZN4qode9qode_argvE when bundling with Parcel and pnpm #190

Open talentlessguy opened 4 years ago

talentlessguy commented 4 years ago

Describe the bug When trying to run a compiled by Parcel plugin React NodeGUI app, it throws an error:

/home/v1rtl/Coding/quark-player/dist/index.js:116
    throw error;
    ^

Error:node_modules/.pnpm/registry.npmjs.org/@nodegui/nodegui/0.18.2/node_modules/@nodegui/nodegui/build/Release/nodegui_core.node: undefined symbol: _ZN4qode9qode_argvE

To Reproduce Steps to reproduce the behavior:

  1. Install pnpm
  2. mkdir test-app && cd test-app
  3. Install these dependencies using pnpm i:
{
  "devDependencies": {
    "@babel/core": "^7.9.0",
    "@babel/preset-env": "^7.9.5",
    "@babel/preset-react": "^7.9.4",
    "@babel/preset-typescript": "^7.9.0",
    "@types/react": "^16.9.34",
    "@types/react-dom": "^16.9.6",
    "parcel": "^1.12.4",
    "parcel-plugin-nodegui": "^1.0.3",
    "typescript": "^3.8.3"
  },
  "scripts": {
    "dev": "parcel --target node index.tsx"
  },
  "dependencies": {
    "@nodegui/nodegui": "^0.18.2",
    "@nodegui/react-nodegui": "^0.6.1",
    "react": "^16.13.1",
    "react-dom": "^16.13.1"
  }
}

Expected behavior It should start a React NodeGUI application

Desktop (please complete the following information):

a7ul commented 4 years ago

Yes, this is because you are using node to run the nodegui core addon. The core addon requires that you use qode binary instead.

I am not very familiar with parcel . But I am guessing this is parcel tries to use node binary instead of qode.

talentlessguy commented 4 years ago

@master-atul I tried to set it up with official Parcel plugin

will try with Webpack