Structure
Cloud
-solution
-app
-common
-index.js
When packaged, the app is in the asar file and i'm not sure how to reference the index.js file in the common folder where the server lives.
In development mode I exec a npm script that goes into the common folder and starts the server.
exec('cd ../ && cd common && npm run server', (err,stdout,stderr) => {
.....
if(err){
log.info(error.stack);
log.info('Error code: ' + error.code);}
}
I get this error in the exec callback when I try to run the script in production
Error: Command failed: npm run server-production
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Users\Ibrah\AppData\Local\Programs\Cloud\package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\Ibrah\AppData\Local\Programs\Cloud\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
How can I reference the packaged app server file ?