1

Node, mimosa, durandal newb. I'm attempting to install the mimosa skeleton of durandal on windows, as detailed on the durandal website. Running this command:

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

(quotes because windows and space in path) gives me this error, with the incorrect path for the template installation location:

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)

Removing the quotes around the file path in the command line argument gives the same error. Having a filepath with no spaces gives the same error.

Note that this works fine: C:\Users\Anthony\node projects\typelearn>mimosa skel:new durandal

One question:

  • how can I get the skeleton to install correctly? It looks like a bug to me: C:\Users\Anthony\C:\Users\Anthony\node projects\typelearn is definitely not a path that exists, yet mimosa is attempting to move the cloned repo there.
4

3 回答 3

1

I believe I've fixed that bug and I released a new version of Mimosa. I'm unable to test on Windows at this time, but I'm hopeful the solution was cross-platform.

The folder provided was always envisioned to be something in the current directory. But I'm happy to support the use case you've brought up here.

This same issue will bite you on mimosa new too. I'll get that fixed after I release 2.0 sometime later this month.

于 2014-01-13T17:42:28.640 回答
1

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

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

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

于 2014-01-10T21:47:27.737 回答
0

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

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

于 2014-01-10T20:30:27.433 回答