Latest version: 0.27.5
Do you want to request a feature or report a bug?
A Bug
What is the current behavior?
Install dependencies with command rm -rf node_modules && yarn
If the current behavior is a bug, please provide the steps to reproduce.
The installation failed with error: node_modules/flow-bin: Cannot read property 'config' of undefined".
In the verbose mode, I got this stack trace:
verbose 23.71 TypeError: /Users/project/node_modules/flow-bin: Cannot read property 'config' of undefined
at /usr/local/Cellar/yarn/0.27.5/libexec/lib/yarn-cli.js:34601:185
at Generator.next (<anonymous>)
at step (/usr/local/Cellar/yarn/0.27.5/libexec/lib/yarn-cli.js:91:30)
at /usr/local/Cellar/yarn/0.27.5/libexec/lib/yarn-cli.js:102:13
at <anonymous>
I tried to print out the config value and got this:
Config {
constraintResolver: PackageConstraintResolver { reporter: undefined, config: [Circular] },
requestManager:
RequestManager {
offlineNoRequests: false,
_requestCaptureHar: null,
_requestModule: null,
offlineQueue: [],
captureHar: false,
httpsProxy: '',
ca: null,
httpProxy: '',
strictSSL: true,
userAgent: 'yarn/0.27.5 npm/? node/v8.1.3 darwin x64',
reporter: undefined,
running: 0,
queue: [],
cache: {},
max: 8,
maxRetryAttempts: 5,
timeout: 30000,
cert: '',
key: '' },
reporter: undefined,
rootModuleFolders: [],
registryFolders: [],
linkedModules: [],
registries: {},
cache: {},
cwd: '/Users/crashbell/.config/yarn/global',
looseSemver: true,
commandName: '',
preferOffline: false,
modulesFolder: undefined,
globalFolder: '/Users/crashbell/.config/yarn/global',
linkFolder: '/Users/crashbell/.config/yarn/link',
offline: false,
binLinks: true,
ignorePlatform: false,
ignoreScripts: false,
disablePrepublish: false,
nonInteractive: false,
workspaceRootFolder: null,
lockfileFolder: '/Users/project',
networkConcurrency: 8,
childConcurrency: 5,
networkTimeout: 30000,
_cacheRootFolder: '/Users/crashbell/Library/Caches/Yarn',
workspacesEnabled: false,
pruneOfflineMirror: false,
enableMetaFolder: false,
enableLockfileVersions: false,
linkFileDependencies: false,
cacheFolder: '/Users/crashbell/Library/Caches/Yarn/v1',
tempFolder: '/Users/crashbell/Library/Caches/Yarn/v1/.tmp',
production: false }
What is the expected behavior?
Installation should work without error.
Please mention your node.js, yarn and operating system version.
Node: v8.1.3
Mac OSX: 10.12.5 (16F73)
The issue was gone when I ran a bunch of commands:
cd /Users/crashbell/Library/Caches/Yarn
rm -rf v1
npm install -g node-gyp
Maybe yarn cache folder was corrupted somehow.
That works for me, thank you.
Most helpful comment
The issue was gone when I ran a bunch of commands:
Maybe yarn cache folder was corrupted somehow.