๐Ÿงต#Npm Def Local Path

sythelux

yes SO we have 2 projects next to each other

bla-unity bla-frontend

bla-frontend has to have the typescript content. so we have a subpackage in frontend under src/generated/mypackage/package.json (because frontend is in the CI/CD pipeline and needs the content we can't link from here to unity) bla-unity now has a npmdef file that links to bla-frontend

the npmdef in unity now needs to link to the npm-package in frontend. when I press relink in unity it will choose an absolute path where the npm-package in frontend is located.

my project path can be assumed to be under C:/user/myusername/projects/bla-unity now if a workmate opens it they have C:/user/theirusername/projects/bla-unity and unity fails to find the package under C:/user/myusername/projects/bla-frontend/src/generated/mypackage/package.json

sythelux

the npmdefinition's content look like this atm

{ "type": 1, "packageName": null, "packageVersion": null, "localPath": "C:/Users/MyUserName/bla-frontend/src/generated/packages/Needle.Test~", "allowCodegen": true }

I would like to have the localPath to also use file URIs like package.json does

"localPath": "file:./../../../bla-frontend/src/generated/packages/Needle.Test~",

when I do this I get an exception, that /package.json can't be found. ( I tried multiple variations of file:/ , file://../, file:../.. and various depths to see if it parses from somewhere else, but wasn't able to bruteforce it.)

sythelux

this doesn't work either. I tried multiple depths .., ../.., ../../../ I mean I can also try ./.. ... /../.. but this also looks like bruteforce again