Skip to content
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

Incompatibility with npm5 when run yarn add file:FolderName #4212

Closed
brenordr opened this issue Aug 20, 2017 · 8 comments
Closed

Incompatibility with npm5 when run yarn add file:FolderName #4212

brenordr opened this issue Aug 20, 2017 · 8 comments

Comments

@brenordr
Copy link

Do you want to request a feature or report a bug?
bug

What is the current behavior?
Incompatibility with npm 5.

consider the following package.json (reduced for brevity)

{
  "name": "my-project",
  "description": "my project",
  "main": "index.js",
  "dependencies": {
      "my_local_lib": "file:LocalLib"
   }
}

with npm 5 the lib "my_local_lib" is installed as a symlink
but yarn install it as copy of the folder LocalLib

If the current behavior is a bug, please provide the steps to reproduce.

  1. create a new project
  2. create a sub project (folder named FolderX with a package.json)
  3. yarn add FolderX
  4. yarn install

What is the expected behavior?
create a symlink of FolderX

Please mention your node.js, yarn and operating system version.
node v8.4.0
yarn v0.27.5
macOS 10.12.6

@webmobiles
Copy link

why yarn need npm? if i do npm install -g [email protected] to downgrand from npm5 is ok? it's not yarn independent from npm?

@BYK
Copy link
Member

BYK commented Aug 23, 2017

Looks like this was an unannounced change: http://codetunnel.io/npm-5-changes-to-npm-link/

I'm not sure if changing the file: protocol's behavior to be link: is a good idea. Why do you need it?

@BYK
Copy link
Member

BYK commented Aug 23, 2017

@webmobiles I think your comment is misplaced?

@arcanis
Copy link
Member

arcanis commented Aug 23, 2017

Yeah we decided against implementing this change at the time we started working on the link protocol. Even now I'm not sure we should follow it; if you actually want to copy the files you would have no way of doing it.

@arcanis
Copy link
Member

arcanis commented Aug 23, 2017

The NPM issue: npm/npm#15900

@briandipalma
Copy link

This makes monorepos nicer to work with when using npm. With npm 4 and yarn a change to a local dependency means you have to reinstall. You can link but it's nice to get the same behaviour out of the box with all your dependencies.

@webmobiles
Copy link

@BYK when i install "yarn global create-react-native-app" and npm5 installed does not work to create projects, then i downgrade to v4:
npm install -g [email protected] , and then:
npm -g install create-react-native-app

but when i create the project:

create-react-native-app myproj

yarn is called, yarn works underhood npm version ? that is my question , about yarn and npm5 or npm4 together, thanks

@BYK
Copy link
Member

BYK commented Oct 20, 2017

We do not have plans for implementing this for now so closing the issue.

@webmobiles I cannot figure out what the issue might be from your comment but it doesn't sound related to this issue so feel free to file a new issue with more details about how to reproduce it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants