swagger-api / swagger-node

Swagger module for node.js
http://swagger.io
Apache License 2.0
3.97k stars 585 forks source link

SyntaxError: Invalid regular expression #315

Open iHrushikesh opened 8 years ago

iHrushikesh commented 8 years ago

I am getting below exception with the latest version. This is not happening with version 0.7.0

$ swagger project create helloworld
? Framework? (Use arrow keys)
> connect
  express
  hapi
  restify
  sails [SyntaxError: Invalid regular expression: /.{1,0}/: numbers out of order in {} quantifier.]
dpurrington commented 8 years ago

Same here.

yzhaie commented 8 years ago

get same problem with 0.7.5

rbperegrino commented 8 years ago

Same here

thedamphair commented 8 years ago

Does anyone knows how to solve it yet?

nakamorichi commented 8 years ago

Same problem here with versions 0.7.3~0.7.5, no matter which Node version I try.

nakamorichi commented 8 years ago

Aa, I think I found the reason. I had installed Git with all the path modifications (using Windows 10), so it was probably messing up something. Uninstalled Git and the problem disappeared.

TroyWhite commented 8 years ago

I had this same issue with a fresh install of node and swagger. Looking around the net it seems other node projects have this issue and it is related to the console terminal's tty column width. After running "stty rows 50 cols 80" in the terminal I was using for swagger the "swagger project create hello-world" executed without errors. I'm guessing the problem is buried in some external node package that's shared by swagger and other projects which show this issue.

at15 commented 8 years ago

I was using Git Bash on Windows10 with Node5.9.1 and it shows this error, after switched to windows CMD, the selection list can display, but using the arrow key won't move the selection.

margothi commented 8 years ago

Workaround verification: doing this step in a standard windows 7 command line worked for me. Arrow keys for selection worked also.

samavia commented 7 years ago

I had the same problem using Git Bash on Windows 10, problem solved when used Command line.

badfun commented 7 years ago

Same issue. Windows 10 pro, Node 6.9.2. Using command line worked for me, git bash did not.

mlabuda2 commented 7 years ago

same here. minGw throw error, CMD windows didnt

morrisalp commented 7 years ago

Win 10, Node v6.10.2, had this error in Babun and Git bash but it worked in Powershell.

xiaoyi00112 commented 7 years ago

same here,

ypmei commented 7 years ago

same here

vishalbhardwaj26 commented 7 years ago

Problem was on windows and "swagger project create -f express file-name"

worked for me.

mellodev commented 7 years ago

Same issue with 0.7.5 on windows 10 with git bash shell. Switched to powershell and it works fine.

NisalG commented 6 years ago

Same error in Git Bash - Node v8.9.1 on Win 10 But works on Win Powershell

eaglet3d commented 6 years ago

Fails in Cygwin.

SagarDeshnur17 commented 5 years ago

Fails in windows10 +gitBash. Works with command prompt though.

medazurreo commented 5 years ago

Hello, You need to launch command "swagger project create [project_name]" into a Node.js command prompt , it will allow you to choose your project's type in interactive mode. Enjoy it.

qiufeihong2018 commented 4 years ago

Aa, I think I found the reason. I had installed Git with all the path modifications (using Windows 10), so it was probably messing up something. Uninstalled Git and the problem disappeared.

I’m not think uninstall git !