TypeError: Cannot read property 'split' of undefined
See original GitHub issueExpected Behavior
Hello Brother
I would like to ignore some projects when executing the command `lerna bootstrap`
Current Behavior
Hello Brother
I'm using the model lerna.json
But the error is being returned
When you remove the
"ignore": "component- *",
Works as expected
Possible Solution
Steps to Reproduce (for bugs)
$ lerna ls
lerna notice cli v3.14.1
component-casper-magento
@mozg/crawler-prices
hackathon-casperjs
@mozg/magento-base
@mozg/nodejs-base
@mozg/reactjs-workers
isomorphic-jwt-login
lerna success found 7 packages
$ lerna bootstrap
lerna notice cli v3.14.1
lerna notice filter excluding "component-*"
lerna info filter [ '!component-*' ]
lerna ERR! TypeError: Cannot read property 'split' of undefined
lerna ERR! at Minimatch.match (/home/marcio/.nvm/versions/node/v12.1.0/lib/node_modules/lerna/node_modules/minimatch/minimatch.js:717:9)
lerna ERR! at /home/marcio/.nvm/versions/node/v12.1.0/lib/node_modules/lerna/node_modules/minimatch/minimatch.js:691:15
lerna ERR! at Array.filter (<anonymous>)
lerna ERR! at Function.minimatch.match (/home/marcio/.nvm/versions/node/v12.1.0/lib/node_modules/lerna/node_modules/minimatch/minimatch.js:690:15)
lerna ERR! at /home/marcio/.nvm/versions/node/v12.1.0/lib/node_modules/lerna/node_modules/multimatch/index.js:25:33
lerna ERR! at Array.reduce (<anonymous>)
lerna ERR! at module.exports (/home/marcio/.nvm/versions/node/v12.1.0/lib/node_modules/lerna/node_modules/multimatch/index.js:17:18)
lerna ERR! at filterPackages (/home/marcio/.nvm/versions/node/v12.1.0/lib/node_modules/lerna/node_modules/@lerna/filter-packages/filter-packages.js:44:28)
lerna ERR! lerna Cannot read property 'split' of undefined
$ cat lerna.json
{
"version": "1.1.3",
"npmClient": "yarn",
"command": {
"publish": {
"ignoreChanges": ["ignored-file", "*.md"],
"message": "chore(release): publish"
},
"bootstrap": {
"ignore": "component-*",
"npmClientArgs": ["--no-package-lock"]
}
},
"packages": ["packages/**"]
}
Context
Your Environment
Executable | Version |
---|
$ lerna --version
3.14.1
$ npm --version
6.9.0
$ yarn --version
1.16.0
$ node --version
v12.1.0
OS | Version |
---|
| Ubuntu | 18.04 |
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
How to prevent cannot read property split of undefined
This error is a TypeError , and it occurs when calling a method, operand, or argument on the wrong data type, or when...
Read more >How to Prevent cannot read property split of ... - Gopi Gorantala
The "cannot read property 'split' of undefined" error occurs when trying to call split() method on a variable that stores an undefined value....
Read more >Cannot Read Property 'split' of Undefined - freeCodeCamp
it will throw the TypeError: Cannot read property 'split' of undefined error. The split method. When split is called on a string, it...
Read more >Uncaught TypeError: Cannot read property 'split' of undefined
Your question answers itself ;) If og_date contains the date, it's probably a string, so og_date.value is undefined.
Read more >TypeError: Cannot read property 'split' of undefined - SitePoint
TypeError : Cannot read property 'split' of undefined ... Somebody please guide me. Zulfi. Zulf. ... If you want contractCode2 to be a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Do all of your leaf packages have a
name
field in their package.json files?A better error message would be helpful!