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

An unexpected error occurred: "ENOENT: no such file or directory, open node_modules/yarn/node_modules/request/index.js' #3075

Closed
felixfbecker opened this issue Apr 7, 2017 · 3 comments

Comments

@felixfbecker
Copy link

felixfbecker commented Apr 7, 2017

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

Bug

What is the current behavior?
yarn logs error

An unexpected error occurred: "ENOENT: no such file or directory, open node_modules/yarn/node_modules/request/index.js'

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

  • Install yarn
  • make sure that the request lib is in node_modules/request, not in node_modules/yarn/node_modules/request (this can happen depending on other modules installed)
  • run cli/yarn.js

It seems like yarn doesn't follow the usual node module resolution.

What is the expected behavior?
Install should work

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

@swese44
Copy link

swese44 commented Apr 7, 2017

i was seeing a similar issue when trying to install react storybook via yarn 0.21.3:
error An unexpected error occurred: "ENOENT: no such file or directory, open '/Users/me/.config/yarn/global/node_modules/inquirer/lib/inquirer.js'".

The inquirer directory does not exist. If i try to install inquirer directly i get the same error:
» yarn global add inquirer
» error An unexpected error occurred: "ENOENT: no such file or directory, open '/Users/me/.config/yarn/global/node_modules/inquirer/lib/inquirer.js'".

But after upgrading yarn npm install -g yarn to 0.22.0 things are working for me

@felixfbecker
Copy link
Author

It seems to be related to roadrunner, which caches import paths. When I run lib/cli/index.js, the issue does not happen.

@krousseau
Copy link

Unfortunately this didn't fix the issue for my team. We are still getting intermittent build failures with a similar message using version 0.24.5 in our CI environment.

12:24:37 Error: ENOENT: no such file or directory, scandir 'D:\J\workspace\build_branch_frontend\Phoenix\Source\Communispace\Administration\Web\Public\frontend\node_modules\node-sass\vendor' 12:24:37 at Object.fs.readdirSync (fs.js:914:18) 12:24:37 at Object.getInstalledBinaries (D:\J\workspace\build_branch_frontend\Phoenix\Source\Communispace\Administration\Web\Public\frontend\node_modules\node-sass\lib\extensions.js:123:13) 12:24:37 at foundBinariesList (D:\J\workspace\build_branch_frontend\Phoenix\Source\Communispace\Administration\Web\Public\frontend\node_modules\node-sass\lib\errors.js:20:15) 12:24:37 at foundBinaries (D:\J\workspace\build_branch_frontend\Phoenix\Source\Communispace\Administration\Web\Public\frontend\node_modules\node-sass\lib\errors.js:15:5) 12:24:37 at Object.module.exports.missingBinary (D:\J\workspace\build_branch_frontend\Phoenix\Source\Communispace\Administration\Web\Public\frontend\node_modules\node-sass\lib\errors.js:45:5) 12:24:37 at module.exports (D:\J\workspace\build_branch_frontend\Phoenix\Source\Communispace\Administration\Web\Public\frontend\node_modules\node-sass\lib\binding.js:15:30) 12:24:37 at Object.<anonymous> (D:\J\workspace\build_branch_frontend\Phoenix\Source\Communispace\Administration\Web\Public\frontend\node_modules\node-sass\lib\index.js:14:35) 12:24:37 at Module._compile (module.js:571:32) 12:24:37 at Object.Module._extensions..js (module.js:580:10) 12:24:37 at Module.load (module.js:488:32) 12:24:38 error Command failed with exit code 1.

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

No branches or pull requests

3 participants