yarn add package failed after added @types/node

Created on 20 Oct 2016  路  7Comments  路  Source: yarnpkg/yarn

Do you want to request a _feature_ or report a _bug_?
bug

What is the current behavior?
yarn add failed

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

  1. yarn add @types/node --dev
  2. yarn add lodash, failed
// yarn-error.log
Trace: 
  Error: ENOENT: no such file or directory, open 'D:\builden-proj\vsbuild\node_modules\@types\iconv-lite\index.d.ts'
      at Error (native)
  1. yarn add lodash, success

What is the expected behavior?
yarn add lodash can success on everytime

Please mention your node.js, yarn and operating system version.
node.js - 6.8.1
yarn - 0.16.1
os - win7 or macos

Most helpful comment

win10 have the same problem
nodejs-v6.8.1-x86
yarn-v0.16.1

the step is

  1. yarn init --yes
  2. yarn add @types/node --dev
  3. yarn add lodash, the Error show, and node_modules/@types dir have auto deleted

All 7 comments

Works fine on Ubuntu 16.04

win10 have the same problem
nodejs-v6.8.1-x86
yarn-v0.16.1

the step is

  1. yarn init --yes
  2. yarn add @types/node --dev
  3. yarn add lodash, the Error show, and node_modules/@types dir have auto deleted

also removes bower_components as well as node_modules/@types folder.
Do not understand why.
Win8 x64

Confirmed on Win7 x64, yarn v0.16.1

Possible duplicate of #919

Confirmed on two machines: both on Windows 10 x64, [email protected], [email protected]. I tried also on [email protected] - same issue.

919

Was this page helpful?
0 / 5 - 0 ratings