Open pospi opened 8 years ago
Actually, things might be more complex than that. Different module hierarchy, similar issue:
@everledger/express-base-server
│
└── @everledger/express-middleware
│
└── @everledger/logger
From express-middleware
:
yarn install v0.16.1
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 11.62s.
From express-base-server
:
yarn install v0.16.1
[1/4] Resolving packages...
error An unexpected error occured, please open a bug report with the information provided in "/home/pospi/projects/everledger/express-base-server/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
The relevant line from the error log says Error: https://registry.npmjs.org/@everledger%2flogger: Not found
. In this case it appears that the sub-dependency URI is being ignored and Yarn is using the package name to resolve the module instead of the git URI- the dependency is specified as "@everledger/logger": "git+ssh://git@bitbucket.org/everledger/logger.git#1.0.0"
.
It does seem that the second error is the real underlying symptom- I still have @everledger/koa-middleware
published privately to the NPM registry as I was unable to delete it, but only v1.0.0
.
This may be related #513 but is a more specific issue. I've managed to resolve most of the git-uri installation problems by using the form
git+ssh://git@bitbucket.org/everledger/koa-middleware.git#1.1.0
, and that works great in Yarn 0.16.However- it only seems to work if the dependency is being loaded by the toplevel module you're running
yarn
in. I have the following dependency hierarchy:When running
yarn
fromkoa-base-server
, I get:But when running in
koa-static-server
, the output is:It seems like the dependency specified in
koa-base-server
(git+ssh://git@bitbucket.org/everledger/koa-middleware.git#1.1.0
) is being coerced into an SSH form (git@bitbucket.org:everledger/koa-middleware.git#1.1.0
) as the installer walks down the dependency graph.6.7.0
0.16.1