Open richburdon opened 6 years ago
Why are you doing yarn add "@company/package1"
?
That's my scoped package. I.e., I have an npm organization @company
(I mean it's not called that, but for example) and a private package called package1
.
We are having the same issue :cry: Any news on this?
We use npm's private organisation scope and have had issues getting them installed with Yarn.
My workaround was to explicitly set my Yarn registry to https://registry.npmjs.org/
(i.e. our organisation private registry happens to be the npm registry) and I am now able to link and install my private scoped organisation modules.
$ yarn config set registry https://registry.npmjs.org/
This is with Yarn 1.3.2 on Windows 10
I can confirm this issue with Yarn 1.3.2 on macOS Sierra 10.12.6
Same issue
I have the same issue.
@Coridyn your registry change worked: $ yarn config set registry https://registry.npmjs.org/
The registry hack doesn't seem to be working for me on yarn 1.10.
Any update here? Also does not work with v1.12.0!
Same error with version 1.12.3
. What's the status of this issue given that some other people also faced it? 🤔
Recently I switch from Dart to TS and I'm always surprised how such thing like working with local modules/packages can still be a problem in the JS world. 1.12.3
My coworker has this problem on MacOS (Sierra 10.12.6) with yarn 1.13.0.
yarn link
with scoped packages works fine for me on Windows 10 (yarn 1.10.1).
still a thing with yarn 1.19.1 on Win 7, I'm afraid.
Also have this issue on MacOS 10.14.6
Workaround for me was to escape the forward-slash and manually add to package.json
dependencies:
yarn link @company\/package-name
I have the same issue on linux machine and the solution provided by @simpleshadow works for me :+1:
I am still having the same error as in the starting post of this thread, on Windows 10. Linking the package by escaping the forward slash does not help either. Manually adding the package to dependencies
in package.json
and running yarn install
results in the same error.
Not sure if it makes a difference, but I am trying to test a package that has not been published to any registry yet, so it only exists on my hard drive. Why does it still try to search for it on registry.yarnpkg.com after linking?
Turns out there's a separate ticket for this: https://github.com/yarnpkg/yarn/issues/2611
This is a bug.
What is the current behavior?
The same error occurs if the named package is already in
package.json
before callingyarn install
.NOTE:
yarn link
seems to create the appropriate symlink. I.e.,I've also confirmed that
yarn install
works if I'm just using the published package (i.e., not usinglink
).If the current behavior is a bug, please provide the steps to reproduce. ABOVE.
What is the expected behavior? The linked package should be used.
Please mention your node.js, yarn and operating system version. node v9.2.1 yarn 1.3.2 OS/X 10.13.1