ReasonmL的新手,我可能不了解用于设置的便笺本文档 一个模块作为依赖项。
- ReasonmL项目,使用〜/ ml / myutils / src目录中的MyUtils.re文件正确编译。
-
〜/ ml / project2 / src中的第二个ReasonmL项目,文件Demo.re以
开头打开MyUtils;
我安装了第一个项目:我都尝试了
npm install -g
在〜/ ml / myutils内部npm install ../myutils-保存 里面〜/ ml / project2
该模块看起来是全局安装的:
npm list -g | grep myutils
├─┬myutils@0.1.3-> / home / user / ml / myutils
以及本地
npm list | grep myutils
└─┬myutils@0.1.3-> / home / user / ml / myutils
"bs-dependencies": [
"@glennsl/bs-json","myutils"
],
package.json
"dependencies": {
"@glennsl/bs-json": "^5.0.2","myutils": "file:../myutils"
}
但是npm run build
:
We've found a bug for you!
/home/user/ml/project2/src/Demo.re 2:6-12
1 │
2 │ open MyUtils;
3 │
4 │
The module or file MyUtils can't be found.
- If it's a third-party dependency:
- Did you list it in bsconfig.json?
- Did you run `bsb` instead of `bsb -make-world`
(latter builds third-parties)?
- Did you include the file's directory in bsconfig.json?
我尝试将file:../myutils
添加到bsconfig.json中:不变
我在做什么错?