server is listening to 3333启动后,报‘mode’ option has not been set
来源:2-8 开发时的服务端渲染

慕莱坞4101375
2018-03-30
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选项
012018-04-02 -
慕莱坞4101375
提问者
2018-04-02
其实我是按照视频搭建的环境,同样的配置,因为版本3一直报错,所以才用了webpack@4.0.0-beta.1 问题解决了。后续跟着视频往下做,就出现了mode问题。@Jokcy 。请问,如果往下继续跟着视频做,我是不是要换回来版本3.0比较好?@Jokcy
012018-04-02
相似问题