请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

server is listening to 3333启动后,报‘mode’ option has not been set


server is listening to 3333
configuration
The 'mode' option has not been set. Set 'mode' option to 'development' or 'production' to enable defaults for this environment.
(node:5300) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): ReferenceError: ReactDomServer is not defined
(node:5300) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:5300) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): ReferenceError: ReactDomServer is not defined
(node:5300) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): ReferenceError: ReactDomServer is not defined
(node:5300) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): ReferenceError: ReactDomServer is not defined
(node:5300) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 5): ReferenceError: ReactDomServer is not defined
(node:5300) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 6): ReferenceError: ReactDomServer is not defined

正在回答

2回答

你用的是webpack4,需要设置mode选项

0 回复 有任何疑惑可以回复我~
  • 提问者 慕莱坞4101375 #1
    非常感谢!按照教程来写的代码,如果是4,mode要怎么设置?
    回复 有任何疑惑可以回复我~ 2018-04-02 14:38:37
提问者 慕莱坞4101375 2018-04-02 14:46:32

其实我是按照视频搭建的环境,同样的配置,因为版本3一直报错,所以才用了webpack@4.0.0-beta.1 问题解决了。后续跟着视频往下做,就出现了mode问题。@Jokcy 。请问,如果往下继续跟着视频做,我是不是要换回来版本3.0比较好?@Jokcy


0 回复 有任何疑惑可以回复我~
  • Jokcy #1
    webpack配置后面改动不多,而且大部分配置都是通用的,只要走通问题不大
    回复 有任何疑惑可以回复我~ 2018-04-02 14:55:55
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号