bailicangdu/react-pxq

npm start报错 linux环境,node v8.9.3

lovegnep opened this issue · 3 comments

root@iZwz94ame76454edg4udzoZ:/home/react-pxq# npm start

yhd-recharge-source@0.1.0 start /home/react-pxq
node scripts/start.js

Starting the development server...

Failed to compile.

./src/index.js
Module build failed: ReferenceError: [BABEL] /home/react-pxq/src/index.js: Unknown option: /home/react-pxq/node_modules/react/index.js.Children. Check out http://babeljs.io/docs/usage/options/ for more information about options.

A common cause of this error is the presence of a configuration options object without the corresponding preset name. Example:

Invalid:
{ presets: [{option: value}] }
Valid:
{ presets: [['presetName', {option: value}]] }

For more detailed information on preset configuration, please see http://babeljs.io/docs/plugins/#pluginpresets-options. (While processing preset: "/home/react-pxq/node_modules/react/index.js")
at Array.map ()

windows环境下,同报错, node v8.1.3
`./src/index.js
Module build failed: ReferenceError: [BABEL] F:\Project\reactStudy\react-pxq\src\index.js: Unknown option: F:\Project\reactStudy\react-pxq\node_modules_react@16.2.0@react\index.js.Children. Check out http://babeljs.io/docs/usage/options/ for more information about options.

A common cause of this error is the presence of a configuration options object without the corresponding preset name. Example:

Invalid:
{ presets: [{option: value}] }
Valid:
{ presets: [['presetName', {option: value}]] }

For more detailed information on preset configuration, please see http://babeljs.io/docs/plugins/#pluginpresets-options. (While processing preset: "F:\Project\reactStudy\react-pxq\node_modules\_react@16.2.0@react\index.js")
at Array.map (native)`

大兄弟,我也是报的这个错,项目都启动不了了啊,作者是不是改了相关配置文件忘记在 readme 里面交代一下呀?

大兄弟,我也是报的这个错,项目都启动不了了啊,作者是不是改了相关配置文件忘记在 readme 里面交代一下呀?

降级webpack-dev-server

npm install -D webpack-dev-server@3.0.0