Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the new generator 3.0.2 & xclap has issues with windows #421

Closed
gkarwchan opened this issue Jun 22, 2017 · 2 comments
Closed

the new generator 3.0.2 & xclap has issues with windows #421

gkarwchan opened this issue Jun 22, 2017 · 2 comments

Comments

@gkarwchan
Copy link

I used the new generator (version 3.0.2) to generate a new application.
When I do "clap dev", it gives me this error on Windows 10

error: uncaughtException: Invalid regular expression: /\node_modules/: \ at end of pattern
{ date: 'Thu Jun 22 2017 08:22:18 GMT-0600 (Mountain Daylight Time)',
process:
{ pid: 2476,
uid: null,
gid: null,
cwd: 'C:\code\hello-electrode',
execPath: 'C:\Program Files\nodejs\node.exe',
version: 'v6.10.3',
argv:
[ 'C:\Program Files\nodejs\node.exe',
'C:\Users\gkarwchan\AppData\Roaming\npm\node_modules\xclap-cli\clap.js',
'dev' ],

.....
......

stack:
[ 'SyntaxError: Invalid regular expression: /\node_modules\/: \ at end of pattern',
' at RegExp (native)',
' at Object.replace (C:\code\hello-electrode\node_modules\xsh\lib\path-cwd-nm.js:18:22)',
' at clap (C:\code\hello-electrode\node_modules\xclap\cli\clap.js:96:48)',

====================
Another note.
On windows, when you submit the command "clip dev" from a directory that contains a file "clip.js", windows by default will try to run clip.js in windows host script

so to run it through xclap you should run the xclap that is in the general npm repository, like this:

c:\users\your-user-name\appdata\roaming\npm\clap.cmd clap.js

is there a way to fix this?

@jchip
Copy link
Member

jchip commented Jun 22, 2017

Thanks for the report. I haven't had a chance to test this on Windows yet. I will try it and fix the issue soon.

@jchip
Copy link
Member

jchip commented Jun 22, 2017

the syntaxerror is fixed.

for now, windows directly trying to invoke the file clap.js can be resolved by using the alias command xclap. I will rename the file to clapfile.js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants