Closed alokmahor closed 3 years ago
I only have little experience with react, but it would be interesting to know what package causes the problem. If you move the program to C:\myapp
, the path should be shorter and visible in the error message.
Thank you for idea of moving directory to C:
for shorter path.
That error is at https://i.stack.imgur.com/PM8SL.png
You could unpack the app.asar
file using npx asar extract app.asar unpackedAsar
and have a look at the package.json
file. Is it valid json? Does it even exist?
Yes C:\alok\resources\app.asar.unpacked\node_modules\obs-studio-node\package.json
a valid json file. Its part of obs-studio-node
module. This is working fine without react.
I guess C:\alok\resources\app.asar.unpacked\node_modules\obs-studio-node\package.json
should be path ineasted of C:\alok\resources\app.asar\node_modules\obs-studio-node\package.json
to make it work. Dont know what electron-builder
is doing
Hm, I'm sorry, I believe this is a react specific problem if it works fine without it.
For Angular I had to create a custom webpack configuration, however, I don't specify anything about osn
here.
setting "asar": false
in build
config is solving my problem :)
Thank you @hrueger
Great.
However, using asar is recommended as it reduces the number of files quite a bit. You can try adding obs-studio-node? to the
asarUnpack` configuration property like descriped here: https://www.electron.build/generated/platformspecificbuildoptions
I was using electron 11.0.3. this version have some bug that is why installer was failing according to https://github.com/electron/electron/issues/25438
Now I am using electron 11.1.0 for which installer is working fine
I am using this example with
react
. My project structure isMy
package.json
is likeon running command
yarn electron-pack
I am getting error which can be seen on this iamge https://i.stack.imgur.com/jEvgm.png This error is related toapp.asar
pathHow can I fix this?