#Developing Electron on a network share

52 messages · Page 1 of 1 (latest)

heavy jewel
#

I have my main computer which is running linux where a standard electron application is located. I have the electron folder being shared through samba to another linux computer. On my main computer when I run npm start it runs like normal. When I try to run it on my testing VM it gives this error.

$ npm start

> app@0.0.1 start
> electron .

sh: 1: electron: not found
#

I tried to use npm install but it still does not work and the error is the same.

snow whale
#

Delete node_modules and reinstall

heavy jewel
#
$ npm install
npm ERR! code ENOTSUP
npm ERR! syscall symlink
npm ERR! path ../electron/cli.js
npm ERR! dest /run/user/1000/gvfs/smb-share:server=(IP),share=(Share)/(Folder)/V0.0.1/(Folder)/node_modules/.bin/electron
npm ERR! errno -95
npm ERR! ENOTSUP: operation not supported on socket, symlink '../electron/cli.js' -> '/run/user/1000/gvfs/smb-share:server=(IP),share=(Share)/(Folder)/V0.0.1/(Folder)/node_modules/.bin/electron'

npm ERR! A complete log of this run can be found in: /home/(Folder)/.npm/_logs/2024-02-12T16_07_32_947Z-debug-0.log
snow whale
#

Yeah symlink doesn't work on shared folder

heavy jewel
#

Is there any way that I can automatically update the code on the VM or test machines then?

snow whale
#

Don't know

heavy jewel
#

Thank you for the help with figuring out the problem.

snow whale
#

There is a flag for npm to disable symlink

#

You can try it

heavy jewel
#

Oh I didn't know that was I thing I will try it.

heavy jewel
snow whale
#

does npx electron . work?

heavy jewel
#

No it does not

$ npx electron .
Need to install the following packages:
electron@28.2.2
Ok to proceed? (y) y
Error launching app
Unable to find Electron app at /run/user/1000/gvfs/smb-share:server=(IP),share=(Share)/(Folder)/Electron Test

Cannot find module '/run/user/1000/gvfs/smb-share:server=(IP),share=(Share)/(Folder)/Electron Test'
snow whale
#

show your package.json

heavy jewel
snow whale
#

from where its comes from?

heavy jewel
snow whale
#

so it does work in empty folder

#

but doesnt work in project folder?

heavy jewel
snow whale
#

crash?

heavy jewel
# snow whale crash?

I apologize I misused the word crash, it still errors out but it does reach the point of asking to proceed.

snow whale
#

Unable to find Electron app at means you dont have package.json

#

in a folder

heavy jewel
#

Yeah but that test is where I tried it in a newly created empty folder.

snow whale
#

what folder path that doesnt work?

#

/run/user/1000/gvfs/smb-share:server=(IP),share=(Share)/(Folder)/V0.0.1/(Folder) ?

#

do you have rights on that folder?

heavy jewel
#

Neither of them worked but they were both on the samba share.

#

I can modify files with no issues even on the VM.

snow whale
#

right for executable?

heavy jewel
snow whale
#

do you have node_modules/.bin/electron file?

heavy jewel
snow whale
#

./node_modules/.bin/electron .

heavy jewel
snow whale
#

./node_modules/electron folder

heavy jewel
#

That folder does exist.

snow whale
#

first error means missing .bin folder

heavy jewel
snow whale
#
$ npm start

> app@0.0.1 start
> electron .

sh: 1: electron: not found
#

this one?

#

it was before reinstall

#

so with installed electron into normal folder

heavy jewel
heavy jewel
snow whale
#

npx run command from .bin folder

heavy jewel
#

There is no .bin folder with the no symlinks flag.

snow whale
#

ls ./node_modules/.bin

heavy jewel
#

ls: cannot access './node_modules/.bin': No such file or directory