【问题标题】:npm link does not work (windows); using git and node.js for lexandra/Aardwolf.gitnpm 链接不起作用(Windows);将 git 和 node.js 用于 lexandra/Aardwolf.git
【发布时间】:2011-12-31 16:08:33
【问题描述】:

我正在按照此移动 javascript 调试器 here 的设置说明进行操作。仅供参考,我使用的是 Windows XP SP2 32 位。请理解我是使用 git、node.js 和 npm 的新手。

现在,我被困在这一步

Download the required libraries by running "npm link" in the checked-out directory

链接here 极大地帮助了我分解第一个链接的步骤。当我发出 git clone 命令时,我推断目录 Aardwolf 已被“签出”。我尝试在 Git Bash 窗口中在目录上运行 npm 链接,这就是我得到的;

npm.cmd link ../../Aardwolf
./npm.cmd: line 1: unexpected EOF while looking for matching `''
./npm.cmd: line 7: syntax error: unexpected end of file

然后,我重新安装了 Git 并尝试通过 Windows 命令行使用它,结果如下:

npm link
npm ERR: Error: npm link not supported on windows

然后它会在特定文件中给出更多错误,但这是主要错误。

所以,我尝试使用 npm 链接,据说它在 Windows 上不受支持。有解决办法吗???

谢谢。

【问题讨论】:

    标签: windows node.js npm


    【解决方案1】:

    这是由于 Windows XP 仅部分支持 Symlinks,并且类似地,Windows Vista 和 7 需要管理员权限才能使用符号链接。

    npm github 页面上提出了 npm 链接在 windows 上失败的问题。

    【讨论】:

      【解决方案2】:

      我试过了,在 nodejs 0.65 版本中,链接命令不起作用,说:不支持 windows。 但是使用最新版本的nodejs 0.8.1,它可以工作! 哦,我的是 windows 7 x64

      【讨论】:

        【解决方案3】:

        也许您应该尝试这里描述的 mklink 或 junction http://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/(然后将您的发现告诉我们!)

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 2014-09-28
          • 2018-01-04
          • 1970-01-01
          • 1970-01-01
          • 2019-05-30
          • 2021-03-21
          • 1970-01-01
          • 2012-02-29
          相关资源
          最近更新 更多