-
Notifications
You must be signed in to change notification settings - Fork 6
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
Start module resolution from mainModulePath #30
Comments
Since there's a symlink to Does a manual |
I miswrote above; corrected now: |
Hmm, I have similar Comunica setups, so it should be possible to make this work though. Can we put this on hold until the new Components.js release is out? |
The key difference here is probably that I am starting the I expect that you are probably instantiating from the separate module directly.
That's fine with me, but I expect that a similar decision will need to be taken there. The fundamental question is:
I suspect that, in your cases, both happen to have been the same path. |
You may be right, my cases are indeed always instantiating themselves.
This is probably what we want. But I'll have to check to make sure that we're not missing something, as to not break existing setups. |
Confirmed failing with version 4. To reproduce: git clone [email protected]:RubenVerborgh/solid-hue.git
cd solid-hue
git checkout feat/componentsjs-4
npm ci
npm ln @solid/community-server // checked out to https://github.com/solid/community-server/pull/505
npx community-solid-server -c settings.json -m . Results in
|
@RubenVerborgh Your suggested fix above seems to do the trick (and breaks nothing else). FYI, you'll also have to update the generator to 2.0.0 to make things work (needed for JSON-LD 1.0 -> 1.1). |
🤘
🤘🤘🤘🤘🤘
Ooh, exciting. Thanks! |
I wonder if the code at https://github.com/LinkedSoftwareDependencies/Components.js/blob/v3.6.1/lib/factory/UnnamedComponentFactory.ts#L191-L194:
should actually be:
I currently have a folder structure as follows:
projects
solid-hue
node_modules
../../community-solid-server
community-solid-server
node_modules
componentsjs
So when I invoke the server from
community-solid-server
withsolid-hue
asmainModulePath
, thecomponentsjs
functionrequire
will not findcommunity-solid-server
solid-hue
because it is in a different tree.Therefore, I think that module resolution should be relative to the
mainModulePath
.The text was updated successfully, but these errors were encountered: