NPM在祖先的node_modules中找不到包

时间:2019-06-13 08:39:02

标签: npm node-modules npm-scripts

npm运行诸如concurrently "npm run watch:lib" "npm-watch build:scss"之类的脚本时遇到问题。

NPM返回错误:'concurrently' is not recognized as an internal or external command

我想要的东西: 我只想在主目录中安装dev依赖项,而不在子项目中安装

我的树状结构示例:

- myApp/
  - node_modules/
    ...
  - projects/
    - projectA/
      package.json 

了解问题的要素:

/path/to/myApp $ npm ls concurrently
myApp@0.0.0 /path/to/myApp
`-- concurrently@4.1.0
/path/to/myApp $ npm ls concurrently
projectA@0.0.0 /path/to/myApp/projects/projectA
`-- UNMET DEPENDENCY concurrently@4.1.0

npm ERR! missing: concurrently@4.1.0, required by projectA@0.0.0
npm ERR! extraneous: concurrently@4.1.0 /path/to/myApp/projects/projectA\node_
modules\concurrently

出了什么问题?

npm不使用祖先node_modules目录。

0 个答案:

没有答案