easy-team / egg-view-react-ssr

Egg React Server Side Render (SSR) Plugin
https://easyjs.cn
MIT License
62 stars 9 forks source link

ssr开启less报错 #10

Closed zhangyuliangzyl closed 4 years ago

zhangyuliangzyl commented 4 years ago

按文档添加 // webapck.config.js module: { rules: [ { less: true } ] }, // package.json "less": "^2.7.2", "less-loader": "^4.0.5", 配置后执行npm run dev报错 ` easyteam/node_modules/@easy-team/easywebpack-react/lib/base.js:23 if (Array.isArray(itemLoader.use)) { ^

TypeError: Cannot read property 'use' of undefined at /Users/zhangyuliang/Desktop/workspace/ssr/easyteam/node_modules/@easy-team/easywebpack-react/lib/base.js:23:36 at Array.forEach () at WebpackClientBuilder.prepareCssModuleLoader (/Users/zhangyuliang/Desktop/workspace/ssr/easyteam/node_modules/@easy-team/easywebpack-react/lib/base.js:21:26) at WebpackClientBuilder.createWebpackLoader (/Users/zhangyuliang/Desktop/workspace/ssr/easyteam/node_modules/@easy-team/easywebpack/lib/core/loader.js:394:10) at WebpackClientBuilder.combineWebpackConfig (/Users/zhangyuliang/Desktop/workspace/ssr/easyteam/node_modules/@easy-team/easywebpack/lib/target/base.js:141:21) at WebpackClientBuilder.create (/Users/zhangyuliang/Desktop/workspace/ssr/easyteam/node_modules/@easy-team/easywebpack/lib/target/base.js:164:17) at /Users/zhangyuliang/Desktop/workspace/ssr/easyteam/node_modules/@easy-team/easywebpack/lib/builder.js:152:61 at Array.forEach () at Object.exports.getWebpackConfig (/Users/zhangyuliang/Desktop/workspace/ssr/easyteam/node_modules/@easy-team/easywebpack/lib/builder.js:147:12) at Object.exports.getWebpackConfig (/Users/zhangyuliang/Desktop/workspace/ssr/easyteam/node_modules/@easy-team/easywebpack-react/index.js:8:37) at module.exports (/Users/zhangyuliang/Desktop/workspace/ssr/easyteam/config/config.local.js:22:36) at AgentWorkerLoader.loadFile (/Users/zhangyuliang/Desktop/workspace/ssr/easyteam/node_modules/egg-core/lib/loader/egg_loader.js:304:13) at AgentWorkerLoader._loadConfig (/Users/zhangyuliang/Desktop/workspace/ssr/easyteam/node_modules/egg-core/lib/loader/mixin/config.js:83:25) at AgentWorkerLoader._preloadAppConfig (/Users/zhangyuliang/Desktop/workspace/ssr/easyteam/node_modules/egg-core/lib/loader/mixin/config.js:68:27) at AgentWorkerLoader.loadConfig (/Users/zhangyuliang/Desktop/workspace/ssr/easyteam/node_modules/egg-core/lib/loader/mixin/config.js:26:28) at AgentWorkerLoader.loadConfig (/Users/zhangyuliang/Desktop/workspace/ssr/easyteam/node_modules/egg/lib/loader/agent_worker_loader.js:16:11) 2020-10-26 19:25:01,294 ERROR 14479 nodejs.AgentWorkerDiedError: [master] agent_worker#1:14480 died (code: 1, signal: null) at Master.onAgentExit (/Users/zhangyuliang/Desktop/workspace/ssr/easyteam/node_modules/egg-cluster/lib/master.js:425:17) at Master.emit (events.js:315:20) at Messenger.sendToMaster (/Users/zhangyuliang/Desktop/workspace/ssr/easyteam/node_modules/egg-cluster/lib/utils/messenger.js:137:17) at Messenger.send (/Users/zhangyuliang/Desktop/workspace/ssr/easyteam/node_modules/egg-cluster/lib/utils/messenger.js:102:12) at ChildProcess. (/Users/zhangyuliang/Desktop/workspace/ssr/easyteam/node_modules/egg-cluster/lib/master.js:289:22) at Object.onceWrapper (events.js:422:26) at ChildProcess.emit (events.js:315:20) at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12) name: "AgentWorkerDiedError" pid: 14479 `

zhangyuliangzyl commented 4 years ago

sorry,I fixed it now.