节点,含羞草,杜兰达尔纽布。我正在尝试在 Windows 上安装 durandal 的含羞草骨架,详细信息请参见 杜兰达尔网站. 。运行这个命令:

mimosa skel:new durandal "C:\Users\Anthony\node projects\typelearn"

(引号是因为路径中的窗口和空格)给了我这个错误,模板安装位置的路径不正确:

C:\Users\Anthony>mimosa skel:new durandal "C:\Users\Anthony\node projects\typele
arn"
13:16:11 - Retrieving registry...
13:16:11 - Found skeleton in registry
13:16:11 - Cloning GitHub repo [[ git://github.com/BlueSpire/Durandal-Mimosa-Ske
leton.git ]] to temp holding directory.
13:16:13 - Moving cloned repo to  [[ C:\Users\Anthony\C:\Users\Anthony\node proj
ects\typelearn ]].

fs.js:642
  return binding.mkdir(pathModule._makeLong(path),
                 ^
Error: ENOENT, no such file or directory 'C:\Users\Anthony\C:\Users\Anthony\node
 projects\typelearn'
    at Object.fs.mkdirSync (fs.js:642:18)
    at _moveDirectoryContents (C:\Users\Anthony\AppData\Roaming\npm\node_modules
\mimosa\node_modules\skelmimosa\lib\command\new.js:87:8)
    at C:\Users\Anthony\AppData\Roaming\npm\node_modules\mimosa\node_modules\ske
lmimosa\lib\command\new.js:64:5
    at ChildProcess.exithandler (child_process.js:635:7)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:735:16)
    at Socket.<anonymous> (child_process.js:948:11)
    at Socket.EventEmitter.emit (events.js:95:17)
    at Pipe.close (net.js:466:12)

删除命令行参数中文件路径周围的引号会产生相同的错误。没有空格的文件路径会产生相同的错误。

请注意,这工作正常: C:\Users\Anthony\node projects\typelearn>mimosa skel:new durandal

一个问题:

  • 如何才能正确安装骨架?对我来说这看起来像一个错误: C:\Users\Anthony\C:\Users\Anthony\node projects\typelearn 绝对不存在的路径,但 Mimosa 正在尝试将克隆的存储库移至那里。
有帮助吗?

解决方案

我相信我已经修复了这个错误,并且发布了新版本的 Mimosa。我目前无法在 Windows 上进行测试,但我希望该解决方案是跨平台的。

所提供的文件夹始终被设想为当前目录中的某个内容。但我很高兴支持您在这里提出的用例。

同样的问题也会困扰你 mimosa new 也。发布后我会解决这个问题 2.0 本月晚些时候的某个时候。

其他提示

看起来路径必须相对于当前目录,所以我相信这会起作用:

C:\Users\Anthony>mimosa skel:new durandal "\node projects\typelearn"

因为它看起来会自动将当前路径添加到提供的路径中。因此,也许文档需要更具体,否则错误是该命令也应该允许绝对路径。

我认为这是一个错误。这工作正常:

C:\Users\Anthony\node projects\typelearn>mimosa skel:new durandal
14:28:11 - Retrieving registry...
14:28:11 - Found skeleton in registry
14:28:11 - Cloning GitHub repo [[ git://github.com/BlueSpire/Durandal-Mimosa-Ske
leton.git ]] to temp holding directory.
14:28:13 - Moving cloned repo to  [[ C:\Users\Anthony\node projects\typelearn ]]
.
14:28:13 - Cleaning up...
14:28:13 - Skeleton successfully cloned from GitHub.

C:\Users\Anthony\node projects\typelearn>

此处创建的错误: https://github.com/dbashford/mimosa/issues/339

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top