yarnpkg / yarn

The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry
https://classic.yarnpkg.com
Other
41.42k stars 2.72k forks source link

TypeError: Cannot read property 'split' of undefined when yarn-mirror-offline-pruning #3845

Open jdx opened 7 years ago

jdx commented 7 years ago

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

What is the current behavior?

Throws TypeError: Cannot read property 'split' of undefined when running: yarn install from within https://github.com/heroku/cli-engine. Something is going on with local packages. Trying to see if I can reproduce it outside of this project in a simpler fashion. Works fine on 0.24.6.

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

Run yarn install from root of https://github.com/heroku/cli-engine

What is the expected behavior?

Runs successfully as it does in yarn 0.24.6.

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

https://gist.github.com/jdxcode/8d0eedc3368f884b340a8a757c65ea71

jdx commented 7 years ago

I put together a simpler example. This has something to do with yarn-mirror-offline-pruning true as removing that makes it function: https://gist.github.com/dickeyxxx/dfb1f826ab80535889c6aba1d8df33d1

If you go into this project and run yarn from the root it should reproduce. Removing the yarnrc makes it function.

tdfairbrother commented 7 years ago

I am also getting this error when yarn-mirror-offline-pruning true is enabled

jubel-han commented 7 years ago

I also got the error Cannot read property 'split' of undefined for interconnected file based dependencies when yarn-offline-mirror-pruning enabled.

I'm using the existing text case as the example with added the configuration file of .yarnrc

yarn-offline-mirror "./offline-mirror-cache"
yarn-offline-mirror-pruning true
Puneeth-n commented 7 years ago

I face the same issue with yarn: 0.27.5 However, this issue doesn't exist in the latest version of Yarn