Bah - not my day
user@user1:~/safe-fuse-test/safenetwork-fuse$ node bin.js
module.js:550
throw err;
^
Error: Cannot find module 'debug'
Bah - not my day
user@user1:~/safe-fuse-test/safenetwork-fuse$ node bin.js
module.js:550
throw err;
^
Error: Cannot find module 'debug'
John, you are doing valuable work. These look like bugs too - so thatās actually a win
It shows I donāt understand it all and/or donāt have time to test all the ways I can mess up. So, again: thank you.
Two things to try, first:
DEBUG=safenetworkjs*,safe-fuse* node bin
Iām curious to know if I donāt see that because I always run with DEBUG, although again it looks to me like the npm install
was without NODE_ENV=dev
though I know you said you definitely did that.
It would still be a bug though so Iām off to look at the package.json
Anyway, a quick fix might be to then try: npm install debug
user@user1:~/safe-fuse-test/safenetwork-fuse$ DEBUG=safenetworkjs*,safe-fuse* node bin
module.js:550
throw err;
^
Error: Cannot find module 'debug'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/user/safe-fuse-test/safenetwork-fuse/bin.js:3:15)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
Yep, thereās a bug in the safenetworkjs/package.json
so high five man
So in safenetworkjs, you need to do:
npm install --save debug
user@user1:~/safe-fuse-test/safenetworkjs$ npm install --save debug
+ debug@4.1.0
added 16 packages from 3 contributors, updated 2 packages and audited 331 packages in 2.063s
found 1 high severity vulnerability
run `npm audit fix` to fix them, or `npm audit` for details
Yeh, thatās not one of ours as we say in the trade
Thanks for reporting it though. Nothing I can do for now.
No worries. Think Iāll take the lazy option and wait for the zip package!
By all means, although I think youāre probably there now. At least run it!
That last scarey message is only a warning. The code works regardless.
OK I tried node bin.js
and got the same error - do you reckon itās worth starting again from scratch? Iāll try the build process again with the extra steps.
I donāt understand why it is complaining about debug
if you have just installed it. You could check that the following directories exist:
safenetworkjs/node_modules/debug
safenetwork-fuse/node_modules/debug
I not, then try npm install --save debug
in the corresponding project directory and check again.
Iām going to cook dinner now so may not be responsive. Sorry this isnāt going as smoothly as Iād expect. Iāll have to walk through the README.md instructions again.
Yeah they exist OK. Ooo run build-mock seems to be working now. Also off for my dinner!
They exist and you still get this error running node bin
?
Aha - node bin
rather than node bin.js
works. Peruse has now popped up but itās the live rather than the mock version and the safe drive doesnāt seem to have mounted. Iām going to run through it all again
Iām in! Live version again, I canāt get mock to work. Worth noting that ./mount-safe
needs to be run from the safenetwork-fuse/dist/prod folder.
Pretty sure thereās no difference there, so it will be something else.
Cool, so did you build?
node bin
runs the code before build. ./mount-safe
runs the built version.
Anyway, good to see you have something to play with.
No, the build failed again. Lots of warnings then it gave up. However, node bin
started Peruse and ./mount-safe
mounted the drive. It seems pretty much the same as before though (copying a small file into _public causes everything to hang). I did manage to mkdir though. Is that new?
Iām a bit confused as to whatās happening here. If you have a ./safe-fuse
, you must have built it. I havenāt tested the build though, so donāt know what works or not when built, but yes mkdir
is a new feature. Also try the speedup with the File Manager.
When you do node bin
that is the same as running safe-fuse
so it is one or the other that mounts the SAFE drive. The first is running the code - unbuilt - the second runs the same code in built form.
So I suggest you just try node bin
and if that mounts the drive, play with that and forget about building and mount-safe
.
You can only copy to a path that already has files uploaded by WHM. So copying into _public
itself wonāt work, but copying a file next to where you already have at least one file, say index.html
should work.
This is all useful by the way, itās also helping me think about the UX. I was thinking that copying a file to a new directory in _public
could trigger creation of a new container for the file, if that makes any sense? Iād be interested to hear what you think.
node bin
starts Peruse but doesnāt mount the safe-drive.
Yes, sorry. I think the build did work. The first time I tried ./mount-safe
nothing happened so I tried node bin
and then ./mount-safe
and that at least did something. However I just did the build again and retried (just in case, so as not to look a fool) and this time the Peruse opened. Right, onwards!
BTW a good tip if it hangs is fusermount -uz ~/SAFE
EDIT: not really working for me Iām afraid. ./mount-safe
starts Peruse but doesnāt mount the safe drive. Running it again from a separate terminal mounts the drive but even trying to copy a tiny file via the command line into a pre-existing public folder with files in causes it to hang.