New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
README says safe_browser uses node v8 #703
Comments
Hi Mark, thanks for flagging this issue. I can confirm that I am able to reproduce the above behaviour on a fresh clone of the master branch of the browser repo. Another workaround is to run |
Oh, pretty sure I ran yarn first. Will try again and report back, thanks.
…On 29 April 2019 14:11:52 BST, Calum Craig ***@***.***> wrote:
Hi Mark, thanks for flagging this issue.
I can confirm that I am able to reproduce the above behaviour on a
fresh clone of the master branch of the browser repo.
However, a workaround is to run `yarn` first. `NODE_ENV=dev yarn dev`
will then successfully launch the browser. My node version is 8.16.
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#703 (comment)
--
Helping decentralise the Internet with:
SAFE Network - Secure Access For Everyone, https://safenetwork.tech
Project Solid - Tim Berners-Lee's vision of the Web, https://solid.mit.edu
|
We are considering to upgrade everything to the very latest version of nodejs (v12) as that would presumably also help us in getting electron upgraded to v5 in the browser and some of the other example apps. Any thoughts about this? |
@bochaco I don't really know nodejs or the different versions well enough to understand the implications (evidence below! 😉). I see that Solid appear to be using v10 (e.g. for solid-auth-client which I'm working on). On the face of it as much as possible using the same version of node seems to be desirable to avoid problems with using different node versions for different libraries. But I don't know the implications of different versions of node on the codebase, working with other modules etc. My instinct is to go for latest stable version, but it isn't always right! Ooops! @calumcraig I'm on And contrary to the OP I have not found a way to get SAFE Browser working with local To test your solution I did the following, but this still gives the error:
What I thought I'd done to fix it, was this, but this also still gives the error:
If I omit the yarn link as follows it works (but obviously isn't using my local safe_nodejs_app):
The error is back if in safe_browser I then do:
I'm confused here, because safe_nodejs_app doesn't have anything built. I've just forked it and in safe_app_nodejs done So my problem seems not to be the node version in safe_browser, but that I'm linking to safe_app_nodejs - maybe I need that to be on So I have not yet managed to get local SAFE Browser to work with a local safe_app_nodejs What I'm really trying to do though is: ensure my version of solid-auth-client is being used by a SAFE Browser web app. I have not confirmed this 100% but am pretty sure that the published rdflib/solid-auth-client (which is used by safe_app_nodejs) is being inserted into the window object by SAFE Browser, and blocking access to my version by my web app. I'm pretty sure this is the case because my version is used in Firefox, but I get a warning from solid-auth-client about SolidAuthClient being loaded twice when I'm running in SAFE Browser. My plan was to get safe_app_nodejs to use my rdflib/solid-auth-client, but ultimately I think it is a bug that modules used by SAFE Browser/safe_app_nodejs are overriding the ones selected by a web app. If that is indeed what's happening. |
UPDATE: I may have found a solution to using my rdflib/solid-auth-client. I am able to link to rdflib in safe_browser and so don't seem to need to also link to safe_app_nodejs. Looking into this now. So I still don't know how to get local safe_app_nodejs/master to work with local safe_browser/dev but I don't think I need to do this now, so not urgent. |
Ah, OK, I'll try and reproduce on |
Hmm, @theWebalyst I've switched to the |
Just to check @calumcraig were you using Also, just to re-affirm this is no longer an issue for me atm (as I don't seem to nee to use a local safe-app-nodejs). Instead my problem is that in my web app I can't use forked versions of rdflib.js/solid-auth-client with SAFE Browser because the modules it also uses rdflib.js, and causes those versions of rdflib.js/solid-auth-client to be 'imposed' on my web app. I've raised a separate issue #708 |
@theWebalyst , regarding using browser local Then on the browser local dev: |
Thanks @bochaco, I'll close this. If I need to come back to it I'll have another go, but maybe it will just work. Sorry if its been a wild goose chase. |
As per the other issue about rdflib.js, from a theorical point of view, I cannot imagine why there could be a problem with an app includign such a lib wich is running as a webpage, with the rdflib.js that is used by the safe-app-nodejs in the backend as part of the browser. I'm not sure though, @joshuef would you expect any problem as described about this? I just gave it a quick try running the demo app from here and I have no idea how that's supposed to work but I get the sites loading in the browser, and apart from some non-related errors I don't see anything else. |
Yes, it may not be a general problem. It may be because solid-auth-client adds itself to window, and as that is done once by SB loading rdflib.js and then by the Web app doing so, which means there's a clash. I'm still investigating but keep having problems building/debugging. I had it all working once but can't get it back again atm 😦 Will update the other issue when I know something. |
No, I wasn't which would tie in with the behaviour you are describing I think. |
Indeed. The problem I had was only when trying to |
Prerequisites
Expected Behavior
I'm running a local dev browser (no mods yet) with yarn link to a local safe_app_nodejs (no mods yet). I expect the browser to start and function as normal.
Current Behavior
When I run the browser with
NODE_ENV=dev yarn dev
the console includes uncaught exceptions which report that safe_app_nodejs is using a different node version to the browser. The browser window doesn't appear.The Browser README says:
safe_app_nodejs README says:
Possible Solution
Changing the browser to use nodejs v10 appears to fix this issue, so I think the safe_browser README is incorrect. What is the correct version of nodejs to use with SAFE Browser?
Steps to Reproduce (for bugs)
Context
Your Environment
The text was updated successfully, but these errors were encountered: