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

error ENOENT: no such file or directory, open '...AppFolder\node_modules\@types\node\README.md' at Error (native) #919

Closed
wis opened this issue Oct 12, 2016 · 21 comments

Comments

@wis
Copy link

wis commented Oct 12, 2016

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

What is the current behavior?

λ yarn add angular2-apollo --save
yarn add v0.15.1
warning [email protected]: No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
warning [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning Unmet peer dependency "apollo-client@^0.4.0".
warning Unmet peer dependency "apollo-client@^0.4.13".
error ENOENT: no such file or directory, open '<Path to Dir>\AngularSpa\node_modules\@types\node\README.md'
    at Error (native)
info Visit http://yarnpkg.com/en/docs/cli/add for documentation about this command.

If the current behavior is a bug, please provide the steps to reproduce.
yarn add angular2-apollo --save

What is the expected behavior?
install Node package correctly without this unnecessary error

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

λ node -v
v6.3.1

Yarn v0.15.1
install method: MSI installer from website.

OS: Windows 10 Pro Version 1607 (OS Build 14393.321)

@wis
Copy link
Author

wis commented Oct 12, 2016

it just installed without any errors
after

λ yarn add angular2-apollo
yarn add v0.15.1
warning [email protected]: No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
warning [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning Unmet peer dependency "apollo-client@^0.4.0".
warning Unmet peer dependency "apollo-client@^0.4.13".
error ENOENT: no such file or directory, open '<Path to Dir>\AngularSpa\node_modules\@types\node\index.d.ts'
    at Error (native)
info Visit http://yarnpkg.com/en/docs/cli/add for documentation about this command.



λ yarn add angular2-apollo --save
yarn add v0.15.1
warning [email protected]: No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
warning [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning Unmet peer dependency "apollo-client@^0.4.0".
warning Unmet peer dependency "apollo-client@^0.4.13".
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 7 new dependencies.
├─ [email protected]
├─ [email protected]
│  └─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
└─ [email protected]
Done in 26.52s.

@hohwille
Copy link

hohwille commented Oct 27, 2016

I am facing the same issue with recent version of Yarn v0.16.1 on windows 7. The problem is somewhat indeterministic but in complex projects when I have modified package.json then yarn fails on the first run of "Linking dependencies". When I then run yarn again it works fine.
Yarn is already a great improvement over npm. If such quirks would be fixed it will be an awesome rescue.

BTW: I am a user of maven for Java since years. There you have a central repository what is probably the cache folder of yarn in appdata is about. However, instead of duplicating mega- or gigabytes on the disc why dont you just create symlinks (yes also on windows) for the folders in node_modules? I already discussed such things with npm community and gave up as they do not care. Maybe yarn will cure the pain...

@mischkl
Copy link

mischkl commented Oct 27, 2016

Same problem here on Windows 7 x64 with Node 6.7.0 (when trying to install various packages).

@marcomorain
Copy link

marcomorain commented Oct 27, 2016

Same issue here.

System Version
Yarn 0.15.1
Node v6.2.1
OS Microsoft Windows 10 Pro, 10.0.14393 Build 14393

Output:

C:\Users\Marc\Documents\GitHub\web-order [master ≡ +1 ~3 -0 !]> yarn add  @types/redux-thunk
yarn add v0.15.1
[1/4] Resolving packages...
[2/4] Fetching packages...
warning [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
error ENOENT: no such file or directory, open 'C:\Users\Marc\Documents\GitHub\web-order\node_modules\@types\classnames\index.d.ts'
    at Error (native)
info Visit http://yarnpkg.com/en/docs/cli/add for documentation about this command.

Package.json.

@hohwille
Copy link

Sounds like this issue should be reopened or do we need to file a new issue?

@hohwille
Copy link

Currently I have the effect that I get this ENOENT every time I call yarn install. Each time it occurs with a different file and the behaviour is not reproducible but yarn is not yet reliable.

@manrueda
Copy link

manrueda commented Nov 2, 2016

I'm having the same issue with yarn install

System Version
Yarn v0.16.1
Node v4.5.0
OS Windows Server 2008 R2 (7601.win7sp1_ldr.160930-0600)

@rkusuma
Copy link

rkusuma commented Nov 9, 2016

is it has been fixed?

@viktor-nikolaev
Copy link

as a temporal workaround on our build server:
(yarn install || yarn install) && yarn run build:prod

@wclr
Copy link
Contributor

wclr commented Nov 13, 2016

@rkusuma those issues refers to windows users, and windows users should suffer =)

@AntJanus
Copy link

I'm having an identical issue on windows 10, Node v6.9.1 running it in Powershell:

error An unexpected error occurred: "ENOENT: no such file or directory, lstat 'C:\\Users\\[my username]\\AppData\\Local\\Yarn\\cache\\npm-gulp-4.0.0-alpha.2-58ae6d972ff84fa07ba9cc30cf7d13d9bc646f39'".

Pretty much makes Yarn completely unusable on Windows machines.

@wclr
Copy link
Contributor

wclr commented Nov 14, 2016

@AntJanus I think it is a little bit different issue, the original issue is about disappearing modules from project's node_modules, not cache.

@AntJanus
Copy link

@whitecolor time to file a new issue then! Thanks!

@ghost
Copy link

ghost commented Nov 17, 2016

I have the same problem. Most of the time yarn install works, but sometimes I get the error that some file in node_modules/@types can not be found.

yarn install v0.17.2
[1/4] Resolving packages...
[2/4] Fetching packages...
warning [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
error An unexpected error occurred: "ENOENT: no such file or directory, open 'D:\projectX\node_modules@types\async\index.d.ts'".

Windows 8.1
NodeJS 6.8.1
Yarn 0.17.2

@manrueda How do you print that pretty table for your specs?

@ghost
Copy link

ghost commented Nov 17, 2016

I noticed that @wesamco, @marcomorain, and me all have "fsevents" in their output logs. Coincidence?

@viktor-nikolaev
Copy link

viktor-nikolaev commented Nov 17, 2016

@centigrade-thomas-becker it can be easily reproduced following this steps:

  1. yarn add @types\node
  2. yarn install
  3. yarn install whatever-package
  4. ???
  5. Got an error

ie this bug appears anytime you change your package.json what is causing yarn to link dependencies.

@marcomorain
Copy link

It's the same for me - it happens after adding a package from the types user namespace on npm to package.json

@maybeec
Copy link

maybeec commented Nov 28, 2016

Seems to be fixed by #1861 but is not yet released. I tested it on master.

@ghost
Copy link

ghost commented Feb 20, 2017

The referenced issue is now marked as resolved: #1861

@charpeni
Copy link

I can confirm that it was fixed. cc @bestander

@bestander
Copy link
Member

Thanks, let's close this then

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