angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

yarn isn't installing packages correctly

Open dchinn opened this issue 9 years ago • 2 comments

Bug Report or Feature Request (mark with an x)

- [x ] bug report -> please search issues before submitting
- [ ] feature request

Versions.

@angular/cli: 1.0.1 node: 6.10.2 os: win32 x64 yarn says 0.24.6 in 'Programs and Features' list; yarn --version says v0.22.0

Repro steps.

The log given by the failure.

Cannot find module 'remove-trailing-separator' Error: Cannot find module 'remove-trailing-separator' at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (D:\dev\samples\angular\uc5\node_modules\normalize-path\index.js:8:31) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (D:\dev\samples\angular\uc5\node_modules\micromatch\lib\utils.js:20:19) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32)

Desired functionality.

Mention any other details that might be useful.

The above happens because the remove-trailing-separator folder in node_modules is missing an index file.

The following works as expected: ... ng set --global packageManager=npm ... ng new GoodProject ... cd GoodProject ... ng serve

Comparing the node_modules\remove-trailing-separator folders in both GoodProject and FailedProject is what revealed the missing index.js

Further, 'yarn install' in GoodProject makes GoodProject fail, and 'npm install' in FailedProject makes FailedProject succeed.

dchinn avatar Jun 14 '17 22:06 dchinn

This is an issue with yarn, not with the Angular CLI as you were able to reproduce this issue outside the CLI, I suggest opening an issue with that team. Good luck.

Brocco avatar Jun 15 '17 16:06 Brocco

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.