Open dawidpstrak opened 4 years ago
Sure, just like in any other nodejs or webpack app
But i got this error when i try https://pasteboard.co/J70Fp6y.png
you should run 2 npm scripts at the same time:
npm run start
starts actual qode instance, while npm run dev
starts webpack bundle for your js code
so you need to run both start
and dev
UPD: both scripts should be running, if you need to restart app, you can just restart only npm run start
task
Yes i have started both. Dev server is working but shown error :
https://pasteboard.co/J70SV3F.png
and when i try npm run start
it cant start
https://pasteboard.co/J70TCJr.png
It only happens when i ve my import lines in code
const memoryjs = require('memoryjs')
const processes = memoryjs.get.processes()
console.log(processes)
When i remove these lines app render without problems.
It's not memoryjs
issue because i dont have problem to require it in normal js file and run it with node filename
.js
oh, I see now
memoryjs
has some native code that is prebuilt for specific nodejs version
some additional steps may be required in this case, https://docs.nodegui.org/docs/guides/using-native-node-modules
or you can try different lib without prebuilt native binaries
Ok cant setup it. Anyway thanks help.
HI. Is it possible to import library by const library = require('library') ?