这是我在运行npm start
时在PowerShell中遇到的错误。
我不知道parsers
必须是registered
。
PS D:\Download\courses\Modern React with Redux [2020 Update]\MyReactWorkSpace\jsx> npm start
> jsx@0.1.0 start D:\Download\courses\Modern React with Redux [2020 Update]\MyReactWorkSpace\jsx
> react-scripts start
i 「wds」: Project is running at http://192.168.56.1/
i 「wds」: webpack output is served from
i 「wds」: Content not from webpack is served from D:\Download\courses\Modern React with Redux [2020 Update]\MyReactWorkSpace\jsx\public
i 「wds」: 404s will fallback to /
Starting the development server...
D:\Download\courses\Modern React with Redux [2020 Update]\MyReactWorkSpace\jsx\node_modules\snapdragon\lib\parser.js:473
throw new Error('no parsers registered for: "' + self.input.slice(0, 5) + '"');
^
Error: no parsers registered for: "] Fro"
at parse (D:\Download\courses\Modern React with Redux [2020 Update]\MyReactWorkSpace\jsx\node_modules\snapdragon\lib\parser.js:473:15)
at Parser.parse (D:\Download\courses\Modern React with Redux [2020 Update]\MyReactWorkSpace\jsx\node_modules\snapdragon\lib\parser.js:477:24)
at Snapdragon.parse (D:\Download\courses\Modern React with Redux [2020 Update]\MyReactWorkSpace\jsx\node_modules\snapdragon\index.js:122:28)
at Snapdragon.<anonymous> (D:\Download\courses\Modern React with Redux [2020 Update]\MyReactWorkSpace\jsx\node_modules\braces\lib\braces.js:40:45)
at Braces.parse (D:\Download\courses\Modern React with Redux [2020 Update]\MyReactWorkSpace\jsx\node_modules\braces\lib\braces.js:66:26)
at Braces.expand (D:\Download\courses\Modern React with Redux [2020 Update]\MyReactWorkSpace\jsx\node_modules\braces\lib\braces.js:87:18)
at create (D:\Download\courses\Modern React with Redux [2020 Update]\MyReactWorkSpace\jsx\node_modules\braces\index.js:142:15)
at memoize (D:\Download\courses\Modern React with Redux [2020 Update]\MyReactWorkSpace\jsx\node_modules\braces\index.js:298:13)
at Function.braces.create (D:\Download\courses\Modern React with Redux [2020 Update]\MyReactWorkSpace\jsx\node_modules\braces\index.js:165:10)
at Function.braces.expand (D:\Download\courses\Modern React with Redux [2020 Update]\MyReactWorkSpace\jsx\node_modules\braces\index.js:81:17)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! jsx@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the jsx@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\LMALLIKARJUNAKE\AppData\Roaming\npm-cache\_logs\2020-07-21T14_29_11_835Z-debug.log
答案 0 :(得分:2)
我想解析器的路径[
中的括号(]
和D:\Download\courses\Modern React with Redux [2020 Update]\MyReactWorkSpace\jsx
)有问题。
删除它们(即更改目录的“名称”),并尝试在路径中避免空格。现代操作系统和大多数平台/框架都没有问题。但这通常可以省去您的麻烦! :)