yarnpkg / yarn

The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry
https://classic.yarnpkg.com
Other
41.44k stars 2.73k forks source link

Cannot fetch newman from yarn install #739

Closed dpkshrma closed 7 years ago

dpkshrma commented 8 years ago

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

bug

What is the current behavior?

After resolution process is complete, yarn errors during fetch:

[2/4] Fetching packages...
error ENOENT: no such file or directory, scandir '/home/deepak/.yarn-cache/npm-postman-runtime-2.5.4/man'

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

  1. Mention newman as devDependency in package.json

     "devDependencies": {
        "newman": "^3.1.2",
         ...
  2. yarn install

What is the expected behavior?

Yarn should complete all 4 processes.

Please mention your node.js, yarn and operating system version.

yarn: v0.15.1 node: v6.3.1 OS: ubuntu 14.04

dpkshrma commented 8 years ago

On a sidenote, I haven't seen any other dependency causing such issue during install so far. But since, the npm modules are being fetched from registry.yarnpkg.com , so, I suspect, some modules might not have been indexed properly (just guessing here) which indicates there might be more packages which might be facing similar issue.

cnadeau commented 8 years ago

I have the exact same issue with

yarn add jshint-reporter-bamboo

houjunchen commented 8 years ago

I have the same issue with loopback-connector-sendgrid:

error ENOENT: no such file or directory, scandir '/Users/abnerchen/.yarn-cache/npm-loopback-connector-sendgrid-2.0.6/bin'
    at Error (native)
jaydp17 commented 8 years ago

+1 for loopback-connector-sendgrid Facing the same issue 😕

jaydp17 commented 8 years ago

@houjunchen I've found a workaround this problem, may be you can use it too.

We are installing a fork of loopback-connector-sendgrid directly from Github, and according to the package.json file in the Github repo, it is expecting a bin directory, which yarn checks and fails to find it, thus it's complaining.

What we did was, in our fork, we kept only the directories that are actually present in the repo. It worked!! 🎉

ghost commented 8 years ago

So, NPM must be ignoring bin and man directories that are specified that don't exist. Should Yarn do the same to catch the error when handling the bin and man directories?

Logging a warning might be nice, since the package might not work correctly if a bin directory was really expected to exist.

busches commented 7 years ago

Is anyone still facing this issue with yarn@latest? I'm unable to reproduce with 0.17.10.

{                      
  "name": "issue739",  
  "version": "1.0.0",  
  "main": "index.js",  
  "license": "MIT",    
  "devDependencies": { 
     "newman": "^3.1.2"
 }                     
}
yarn
yarn install v0.17.10
info No lockfile found.
[1/4] Resolving packages...
warning newman > postman-runtime > node-uuid@1.4.7: use uuid module instead
warning newman > serialised-error > node-uuid@1.4.7: use uuid module instead
warning newman > postman-request > node-uuid@1.4.7: use uuid module instead
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 69.06s.

If you can reproduce the error, please provide a package.json file to replicate the issue.

wolfgang42 commented 7 years ago

Can reproduce with yarn@0.17.10, but not yarn@0.18.1. This appears to have been fixed by #1663.

(Note that for newman specifically the bug is reproducible with newman@3.1.2 but not newman@^3.1.2.)

arcanis commented 7 years ago

Closing, since this issue seems to have been fixed