0

I am working through the tutorial on the jspm.io site https://github.com/jspm/jspm-cli/wiki/Getting-Started

All works fine until I get to item 3, where I try to execute

jspm install jquery

and I get this error message

warn Error on getOverride for jspm:github, retrying (2). ReferenceError: ui is not defined at c:\Projects\Project1\node_modules\jspm\node_modules\jspm-registry\registry.js:157:5

nodejs is v0.12.0

npm is 2.5.1

jspm is 0.14.0

and this is on Windows 8.1

Does anyone have any clue what is causing this?

jradxl
  • 535
  • 1
  • 4
  • 20

2 Answers2

0

This looks like it was because there was an error while jspm was trying to create the local registry clone. Ensure you have git installed as git on your machine. Otherwise it may be a permissions issue.

This was a logging bug though - have fixed it with an update to the registry, so that the error should be slightly more useful next time if you update jspm.

guybedford
  • 1,362
  • 11
  • 8
  • Yes, I have git installed. This is what I get now. I think you were expecting an improved error message. Error creating registry file Error: Command failed: C:\Windows\system32\cmd.exe /s /c "git clone --depth=1 https://github.com/jspm/registry.git ." fatal: destination path '.' already exists and is not an empty directory. at ChildProcess.exithandler (child_process.js:744:12). But it does actually complete. – jradxl Feb 23 '15 at 15:36
  • Specifying a directory works: "git clone --depth=1 https://github.com/jspm/registry.git testdir" Note https is being removed by this site. – jradxl Feb 23 '15 at 15:55
0

I was getting a similar error with jspm but my problem was actually in how nodejs child_process.exec was calling the git command.

child_process.exec was running

C:\Windows\system32\cmd.exe /s /c "git clone --depth=1 github.com/jspm/registry.git .

However cmd.exe was still auto running commands set in the registry first. In my case the command changing the working folder. So the cwd was being overridden.

Check your registry settings for:

  • HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun
  • HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun

If there is a command in there to set the drive of working folder it will cause the above error.

Also

With your working folder as c:\, try ruuning the following nodejs code:

var exec = require('child_process').exec;
exec('dir', { cwd: 'C:/windows/fonts' }, function(error, stdout, stderr) {
    console.log('stdout: ' + stdout);
});

If it does not list the contents of the fonts folder then your problem is more likely with child_process.exec in node

fodonnel
  • 402
  • 4
  • 6