javaLuo / react-admin

动态菜单配置、权限精确到按钮、通用模块;标准后台管理系统解决方案
https://isluo.com/work/admin/
Mulan Permissive Software License, Version 2
518 stars 151 forks source link

从master下载,执行yarn后,报kleur' do not define a valid './colors' target #12

Closed macroswang closed 4 years ago

macroswang commented 4 years ago

ERROR in ./src/layouts/BasicLayout.less (./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/src!./node_modules/less-loader/dist/cjs.js??ref--7-3!./src/layouts/BasicLayout.less) Module build failed (from ./node_modules/postcss-loader/src/index.js): Error: Package exports for '/Users/wang/Desktop/react-admin/node_modules/kleur' do not define a valid './colors' target at resolveExportsTarget (internal/modules/cjs/loader.js:618:9) at applyExports (internal/modules/cjs/loader.js:499:14) at resolveExports (internal/modules/cjs/loader.js:548:12) at Function.Module._findPath (internal/modules/cjs/loader.js:654:22) at Function.Module._resolveFilename (internal/modules/cjs/loader.js:953:27) at Function.Module._load (internal/modules/cjs/loader.js:859:27) at Module.require (internal/modules/cjs/loader.js:1028:19

请问这是怎么回事?

javaLuo commented 4 years ago

你可能需要升级一下node.js,至少在10.12以上

macroswang commented 4 years ago

➜ ~ node -v v13.5.0

是v13.5.0,这个问题我在google上去搜索都没结果,好奇怪

macroswang commented 4 years ago

我把nodejs升级到最新版本就可以了,感谢回复