alibaba / ice

🚀 ice.js: The Progressive App Framework Based On React(基于 React 的渐进式应用框架)
https://ice.work
MIT License
17.96k stars 2.1k forks source link

Error: Cannot find module './CONSTRACT' #823

Closed tongjun741 closed 6 years ago

tongjun741 commented 6 years ago

环境信息

问题描述

创建react项目启动时报错

错误信息

ERROR in ./node_modules/@icedesign/base/lib/_components/@alife/next-time-picker/lib/main.scss Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js): ModuleBuildError: Module build failed (from ./node_modules/ice-skin-loader/lib/index.js): Error: Cannot find module './CONSTRACT' at Function.Module._resolveFilename (module.js:538:15) at Function.Module._load (module.js:468:25) at Module.require (module.js:587:17) at require (internal/module.js:11:18) at Object. (/Users/tongjun/workspace/icd-xw/node_modules/ice-skin-loader/lib/secondaryColor.js:6:5) at Module._compile (module.js:643:30)

noyobo commented 6 years ago

点击面板上的 重装依赖 重装下依赖

tongjun741 commented 6 years ago

试过了,没用

我使用的模板是ice-design-schools

tongjun741 commented 6 years ago

手动添加依赖ice-skin-loader@0.1.4可以启动

原因应该是ice-skin-loader@0.1.2的一个bug,昨天ice-skin-loader已经更新了,但ice-scripts还没有更新,所以直接启动不行

noyobo commented 6 years ago

这个是 patch 版本, 重装 ice-scripts 就可以了。