didi / chameleon

🦎 一套代码运行多端,一端所见即多端所见
http://cml.didi.cn/
Apache License 2.0
9.02k stars 692 forks source link

编译时不认npm link的包 #390

Closed jues-zz closed 4 years ago

jues-zz commented 4 years ago

在chameleon-bridge跟chameleon-api都是本地npm link依赖时,编译cml-demo报错:

This dependency was not found:

* chameleon-bridge in ./node_modules/chameleon-api/src/lib/sdk/cmlBridge.js, ./node_modules/chameleon-runtime/src/interfaces/bootstrap/index.interface

复现:

git clone https://github.com/chameleon-team/chameleon-bridge    
cd chameleon-bridge
npm install
npm link    
git clone https://github.com/chameleon-team/chameleon-api
cd chameleon-api
npm install
npm link
git clone https://github.com/chameleon-team/cml-demo
cd cml-demo
npm install
npm link chameleon-bridge
npm link chameleon-api
cml weex build

环境: win10 chameleon-tool@1.0.4、ubuntu18.04 chameleon-tool@1.0.5

jimwmg commented 4 years ago

可以通过 npm i pathtofile 解决