代码之家  ›  专栏  ›  技术社区  ›  Mike Nedelko

Keystonejs安装失败,原因是lodash@3.3.1依赖关系问题

  •  1
  • Mike Nedelko  · 技术社区  · 7 年前

    我正在尝试安装Keystonejs,如下所示 these instructions ,但我在安装yo时收到依赖项错误消息:

    npm ERR! code ETARGET
    npm ERR! notarget No matching version found for lodash@3.3.1
    npm ERR! notarget In most cases you or one of your dependencies are requesting
    npm ERR! notarget a package version that doesn't exist.
    

    规格: 节点v8.9.4 操作系统:macOS HighSierra V10.13.3

    看来lodash@3.3.1当时NPM注册有问题,但这让我想知道为什么在yo中没有升级-这反过来让我觉得我在某种程度上把过程搞砸了。

    无论如何,如果有人能为我指出正确的方向,我将不胜感激。

    迈克

    1 回复  |  直到 4 年前
        1
  •  1
  •   Megidd    7 年前

    没有 答案,但我只是想和你分享一下:

    我的 node v7.10.1 还有我的 npm 4.2.0 我可以安装lodash@ 3.3.1 没有任何问题:

    me@computer:~/Downloads/lodash-test$ npm install lodash@3.3.1
    /home/me/Downloads/lodash-test
    └── lodash@3.3.1 
    

    我还可以安装 yo 没有任何问题 lodash 依赖项具有版本 4.17.5 :

    me@computer:~/Downloads/lodash-test$ npm install yo
    ...
    ...
    Yeoman Doctor
    Running sanity checks on your system
    
    ✔ Global configuration file is valid
    ✔ NODE_PATH matches the npm root
    ✔ Node.js version
    ✔ No .bowerrc file in home directory
    ✔ No .yo-rc.json file in home directory
    ✔ npm version
    
    Everything looks all right!
    /home/me/Downloads/lodash-test
    └─┬ yo@2.0.1 
      ├─┬ async@2.6.0 
      │ └── lodash@4.17.5 
    ...
    ...
      ├── lodash@4.17.5 
      ├─┬ meow@3.7.0 
      │ ├─┬ camelcase-keys@2.1.0 
    ...
    ...
    

    几个月前,大约2017年12月,我用KeystoneJS开发了一个网页。当我看到它 package.json 文件,我看到 洛达斯 版本为 4.13.1 :

        ...
        "keystone": "4.0.0-beta.5",
        "lodash": "^4.13.1",
        ...