Description
I tried creating a project named "102030" but the cli throwed since it tried to run match on a Number (I guess)
Reproduction
react-native init 102030
Solution
Added a leading letter: react-native init a102030
Additional Information
- React Native version: react-native-cli@2.0.1
- Operating System: MacOS
Stacktrace:
~/dev react-native init 102030 23:52:32
/usr/local/lib/node_modules/react-native-cli/index.js:168
if (!name.match(/^[$A-Z_][0-9A-Z_$]*$/i)) {
^
TypeError: name.match is not a function
at validateProjectName (/usr/local/lib/node_modules/react-native-cli/index.js:168:13)
at init (/usr/local/lib/node_modules/react-native-cli/index.js:195:3)
at Object.<anonymous> (/usr/local/lib/node_modules/react-native-cli/index.js:153:7)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.runMain (module.js:605:10)
at run (bootstrap_node.js:418:7)
Description
I tried creating a project named "102030" but the cli throwed since it tried to run match on a Number (I guess)
Reproduction
react-native init 102030Solution
Added a leading letter:
react-native init a102030Additional Information
Stacktrace: