stimulant / ampm

application management + performance monitoring
MIT License
92 stars 25 forks source link

Space in user path error? #25

Closed num3ric closed 7 years ago

num3ric commented 8 years ago

After installation, launching ampm from the Cinder sample folder causes this error: 'C:\Users\Eric' is not recognized as an internal or external command, operable program or batch file.

The full path is C:\Users\Eric Renaud-Houde\Code\ampm\samples\Cinder.

Am I missing something obvious?

endquote commented 8 years ago

Can you paste the full output of the console?

I tried copying the Cinder sample to c:\stimulant\space test\cinder and it ran ok.

endquote commented 8 years ago

Actually it is probably not about the Cinder sample, but rather about dealing with spaces in start.js. You can see there's some workarounds there for spaces already.

I'll have to create a local user account with a space and figure it out.

num3ric commented 8 years ago

I'll test ampm at home tonight to see if that is indeed my issue. Will get back to you.

endquote commented 8 years ago

This might be an issue with npm... I can't run any globally installed modules from a user account with a space in it.

C:\Users\space test\Desktop>npm list -g --depth=0
C:\Users\space test\AppData\Roaming\npm
+-- ampm@1.7.3
`-- forever@0.15.2

C:\Users\space test\Desktop>ampm
'ampm' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\space test\Desktop>forever
'forever' is not recognized as an internal or external command,
operable program or batch file.

Works fine from my normal josh account:

C:\Users\josh\Desktop>npm list -g --depth=0
C:\Users\josh\AppData\Roaming\npm
+-- ampm@1.7.3 -> C:\Stimulant\Source\ampm
+-- csslint@0.10.0
+-- forever@0.15.2
+-- grunt-cli@1.2.0
+-- jscs@3.0.4
+-- jshint@2.9.2
+-- nodemon@1.9.2
`-- watchify@3.7.0

C:\Users\josh\Desktop>forever
help:    usage: forever [action] [options] SCRIPT [script-options]
...

Do you have the same problem with other global modules like forever and nodemon?

richardeakin commented 7 years ago

Just hit this myself, and got the same exact error message (shows the user folder's path up until the first space, and then says 'not recognized'.

endquote commented 7 years ago

@richardeakin Do you have the same issue with nodemon or other globally-installed npm modules?

endquote commented 7 years ago

@richardeakin @num3ric I looked at this a little more. Even if I quote the initial startup command to handle the space, node fails to find the various modules ampm depends on. I'm going to just have to chalk this up as a known issue.

You can keep your user account with a space in it but change your npm prefix to work around the issue.

If you run npm get prefix it probably says something like C:\Users\My Name\AppData\Roaming\npm.

richardeakin commented 7 years ago

Ok good to know. So this is an npm issue?

I ended up just creating a new account name on the machine, but in the future we can just document that you need to have npm somewhere in a place with no spaces.

Thanks for looking into it! We've got another install running ampm now..