Yarn: Cannot fetch newman from yarn install

Created on 11 Oct 2016  路  9Comments  路  Source: yarnpkg/yarn

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", ...

  1. 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

Most helpful comment

@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!! 馃帀

All 9 comments

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.

I have the exact same issue with

yarn add jshint-reporter-bamboo

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)

+1 for loopback-connector-sendgrid
Facing the same issue 馃槙

@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!! 馃帀

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.

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 > [email protected]: use uuid module instead
warning newman > serialised-error > [email protected]: use uuid module instead
warning newman > postman-request > [email protected]: 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.

Can reproduce with [email protected], but not [email protected]. This appears to have been fixed by #1663.

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

Closing, since this issue seems to have been fixed

Was this page helpful?
0 / 5 - 0 ratings