运行报错 Error: Cannot find module '@lerna/add/command'
是按照老师的方法,我看很多同学都有这种问题,但是都没有解决,不知道是老师 lerna 源码和我们不一直导致的吗?(最新的 code 外层 package 没有 bin)
删除重新安装什么都试过了就是不行,就是没手动一个个从远程仓库安装他们下来
IDE 爆红就是这些
const addCmd = require("@lerna/add/command");
const bootstrapCmd = require("@lerna/bootstrap/command");
const changedCmd = require("@lerna/changed/command");
const cleanCmd = require("@lerna/clean/command");
const createCmd = require("@lerna/create/command");
const diffCmd = require("@lerna/diff/command");
const execCmd = require("@lerna/exec/command");
const importCmd = require("@lerna/import/command");
const infoCmd = require("@lerna/info/command");
const initCmd = require("@lerna/init/command");
const linkCmd = require("@lerna/link/command");
const listCmd = require("@lerna/list/command");
const publishCmd = require("@lerna/publish/command");
const runCmd = require("@lerna/run/command");
const versionCmd = require("@lerna/version/command");
就是这些 local dependency
"@lerna/add": "file:../../commands/add",
"@lerna/bootstrap": "file:../../commands/bootstrap",
"@lerna/changed": "file:../../commands/changed",
"@lerna/clean": "file:../../commands/clean",
"@lerna/cli": "file:../cli",
"@lerna/create": "file:../../commands/create",
"@lerna/diff": "file:../../commands/diff",
"@lerna/exec": "file:../../commands/exec",
"@lerna/import": "file:../../commands/import",
"@lerna/info": "file:../../commands/info",
"@lerna/init": "file:../../commands/init",
"@lerna/link": "file:../../commands/link",
"@lerna/list": "file:../../commands/list",
"@lerna/publish": "file:../../commands/publish",
"@lerna/run": "file:../../commands/run",
"@lerna/version": "file:../../commands/version",
弄了我几个小时,请老师指点
84
收起
正在回答 回答被采纳积分+1
1回答
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星