`yarn start` gives error
byw opened this issue ยท 6 comments
Hi there,
Running on MacOS 10.15.4, with all the prerequisites listed in the doc. npm start
doesn't produce any output. yarn start
gives:
ERROR in ./node_modules/@nodegui/nodegui/dist/lib/utils/addon.js
Module not found: Error: Can't resolve '../../../build/Release/nodegui_core.node' in '/Users/bob/local-projects/trynodegui/nodegui-starter/node_modules/@nodegui/nodegui/dist/lib/utils'
@ ./node_modules/@nodegui/nodegui/dist/lib/utils/addon.js 3:14-65
@ ./node_modules/@nodegui/nodegui/dist/lib/core/FlexLayout.js
@ ./node_modules/@nodegui/nodegui/dist/index.js
@ ./src/index.ts
error Command failed with exit code 2.
Any idea what might be the problem? Thanks!
Yes seems like a build issue
- Try with removing node_modules folder and re installing using
yarn install
or
- do
cd ./node_modules/@nodegui/nodegui
npm run build:addon
cd ...
yarn start
Thanks, number 2 worked!
With an extra step:
It was complaining about not finding Qt config files. brew install qt
seemed to have fixed it. I don't know if this is the proper way though.
thats pretty strange. Looks like it failed to download the qt files in your case.
Qt files are usually setup by nodegui itself on npm install.
Anyway please report back in case you face issues.
Just another data-point. I encountered the above Error: Can't resolve '../../../build/Release/nodegui_core.node'
and looking for the file I realised it was, indeed, no longer there. It had been there for several days, and NodeGUI builds had been functioning well. No idea why the entire build
dir vanished, I'm going to blame some yarn
operation in a different repository, since I'm using yarn link
to pull one repo into another.
Running yarn install --force
in the project's root dir seems to have restored all the missing files.
brew install cmake
on MAC
brew install cmake
on MAC
and then yarn install
again