Question

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.
Was it helpful?

Solution

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.

OTHER TIPS

It looks like the path has to be relative to the current directory so I believe this would have worked:

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

since it looks like it automatically adds the current path to the one supplied. So maybe the docs need to be more specific or else the bug is that the command should allow for absolute paths as well.

I think this is a bug. This works fine:

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>

Bug created here: https://github.com/dbashford/mimosa/issues/339

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top