我是react.js的新手。我在生产中遇到这个错误,但同样的代码正在开发。任何人都可以帮助我。当我在develop.everytime webpack上运行这个代码并生成一个dist文件夹时,这个文件夹有一个bundle.js但是webpack不是基于生产构建的
/home/ubuntu/.pm2/logs/server-out-0.log last 10 lines:
0|server | Version: webpack 1.13.2
0|server | Time: 566ms
0|server | Asset Size Chunks Chunk Names
0|server | bundle.js 1.52 kB 0 [emitted] main
0|server | chunk {0} bundle.js (main) 28 bytes [rendered]
0|server | [0] multi main 28 bytes {0} [built] [1 error]
0|server |
0|server | ERROR in multi main
0|server | Module not found:
Error:Cannot resolve 'file' or 'directory'
./client/index.html in /var/www/html/AR/server
0|server | @ multi main
[STREAMING] Now streaming realtime logs for [all] processes
0|server | Error: Cannot GET /dist/bundle.js
0|server | at raiseUrlNotFoundError
(/var/www/html/AR/node_modules/loopback/server/middleware/url-not-
found.js:20:17)
0|server | at Layer.handle [as handle_request]
(/var/www/html/AR/node_modules/express/lib/router/layer.js:95:5)
0|server | at trim_prefix
(/var/www/html/AR/node_modules/express/lib/router/index.js:312:13)
0|server | at
/var/www/html/AR/node_modules/express/lib/router/index.js:280:7
0|server | at Function.process_params
(/var/www/html/AR/node_modules/express/lib/router/index.js:330:12)
0|server | at next
(/var/www/html/AR/node_modules/express/lib/router/index.js:271:10)
0|server | at SendStream.error
(/var/www/html/AR/node_modules/express/node_modules/serve-
static/index.js:121:7)
0|server | at emitOne (events.js:96:13)
0|server | at SendStream.emit (events.js:188:7)
0|server | at SendStream.error
(/var/www/html/AR/node_modules/express/node_modules/send/index.js:275:17)
谢谢,