Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

npm - react-native init MyProject --version 0.58.6 but every time i do this , there comes an error as follows

i am trying to init a new react native project using the command react-native init MyProject --version 0.58.6 but every time i do this , there comes an error as follows - Done in 80.32s.

D:MyProject ode_modulesmetro-configsrcdefaultslacklist.js:34
return new RegExp( ^

SyntaxError: Invalid regular expression: /(.fixtures.|node_modules[]react[]dist[].|website ode_modules.|heapCaptureundle.js|.tests.)$/: Unterminated character class at new RegExp () at blacklist (D:MyProject ode_modulesmetro-configsrcdefaultslacklist.js:34:10) at getBlacklistRE (D:MyProject ode_modules eact-nativelocal-cliutilConfig.js:56:10) at Object. (D:MyProject ode_modules eact-nativelocal-cliutilConfig.js:71:20) at Module._compile (internal/modules/cjs/loader.js:959:30) at Module._compile (D:MyProject ode_modulespirateslibindex.js:99:24) at Module._extensions..js (internal/modules/cjs/loader.js:995:10) at Object.newLoader [as .js] (D:MyProject ode_modulespirateslibindex.js:104:7) at Module.load (internal/modules/cjs/loader.js:815:32) at Function.Module._load (internal/modules/cjs/loader.js:727:14)

After building dependencies is done

question from:https://stackoverflow.com/questions/65914294/react-native-init-myproject-version-0-58-6-but-every-time-i-do-this-there-co

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

It seems it is the bug in the old version of react-native I also have suffered from it sometimes, I have solved the same problem with the StackOverflow answer:

How to resolve the error on 'react-native start'


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...