question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SyntaxError: Invalid regular expression: /.{1,0}/: numbers out of order in {} quantifier

See original GitHub issue

I’ve tried to build Semantic-UI in clean Docker environment. Here is Dockerfile:

FROM node:latest
# FROM node:4

RUN mkdir -p /usr/src/app/
WORKDIR /usr/src/app/

RUN npm install -g gulp && npm install semantic-ui --save

I’ve tried with two configurations:

  • node:4: nodejs v4.8.3 + npm 2.15.11
  • node:latest: nodejs v7.10.0 + npm 4.2.0

And I’ve got same result:

> semantic-ui@2.2.10 install /usr/local/lib/node_modules/semantic-ui
> gulp install

[10:46:23] Using gulpfile /usr/local/lib/node_modules/semantic-ui/gulpfile.js
[10:46:23] Starting 'install'...
[10:46:23] Starting 'run setup'...
? Set-up Semantic UI (Use arrow keys)
❯ Automatic (Use defaults locations and all components)
  Express (Set components and output folder)
  Custom (Customize all src/dist values) [10:46:23] 'run setup' errored after 23 ms
[10:46:23] SyntaxError: Invalid regular expression: /.{1,0}/: numbers out of order in {} quantifier
    at new RegExp (<anonymous>)
    at breakLines (/usr/local/lib/node_modules/semantic-ui/node_modules/inquirer/lib/utils/screen-manager.js:108:15)
    at module.exports.ScreenManager.render (/usr/local/lib/node_modules/semantic-ui/node_modules/inquirer/lib/utils/screen-manager.js:55:22)
    at Prompt.render (/usr/local/lib/node_modules/semantic-ui/node_modules/inquirer/lib/prompts/list.js:103:15)
    at Prompt._run (/usr/local/lib/node_modules/semantic-ui/node_modules/inquirer/lib/prompts/list.js:74:8)
    at Prompt.run (/usr/local/lib/node_modules/semantic-ui/node_modules/inquirer/lib/prompts/base.js:57:8)
    at Object.<anonymous> (/usr/local/lib/node_modules/semantic-ui/node_modules/inquirer/lib/ui/prompt.js:84:12)
    at module.exports (/usr/local/lib/node_modules/semantic-ui/node_modules/run-async/index.js:15:21)
    at AnonymousObservable.__subscribe (/usr/local/lib/node_modules/semantic-ui/node_modules/inquirer/lib/utils/utils.js:16:7)
    at AnonymousObservable.tryCatcher (/usr/local/lib/node_modules/semantic-ui/node_modules/rx-lite/rx.lite.js:63:31)
[10:46:23] 'install' errored after 26 ms
[10:46:23] SyntaxError in plugin 'run-sequence(run setup)'
Message:
    Invalid regular expression: /.{1,0}/: numbers out of order in {} quantifier
Stack:
SyntaxError: Invalid regular expression: /.{1,0}/: numbers out of order in {} quantifier
    at new RegExp (<anonymous>)
    at breakLines (/usr/local/lib/node_modules/semantic-ui/node_modules/inquirer/lib/utils/screen-manager.js:108:15)
    at module.exports.ScreenManager.render (/usr/local/lib/node_modules/semantic-ui/node_modules/inquirer/lib/utils/screen-manager.js:55:22)
    at Prompt.render (/usr/local/lib/node_modules/semantic-ui/node_modules/inquirer/lib/prompts/list.js:103:15)
    at Prompt._run (/usr/local/lib/node_modules/semantic-ui/node_modules/inquirer/lib/prompts/list.js:74:8)
    at Prompt.run (/usr/local/lib/node_modules/semantic-ui/node_modules/inquirer/lib/prompts/base.js:57:8)
    at Object.<anonymous> (/usr/local/lib/node_modules/semantic-ui/node_modules/inquirer/lib/ui/prompt.js:84:12)
    at module.exports (/usr/local/lib/node_modules/semantic-ui/node_modules/run-async/index.js:15:21)
    at AnonymousObservable.__subscribe (/usr/local/lib/node_modules/semantic-ui/node_modules/inquirer/lib/utils/utils.js:16:7)
    at AnonymousObservable.tryCatcher (/usr/local/lib/node_modules/semantic-ui/node_modules/rx-lite/rx.lite.js:63:31)

Looks like same as: #4292

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:9
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
soarcommented, Jul 3, 2017

So, looks like this problem related to non-interactive installation mode (when you have no access to choose any options with arrow keys).

1reaction
edtokencommented, Jul 3, 2017

@jlukic, I have the same problem, I think you have a problem here: Invalid regular expression: /.{1,0}/: numbers out of order in {} quantifier

Read more comments on GitHub >

github_iconTop Results From Across the Web

JavaScript: Invalid quantifier in regex - Stack Overflow
When you get an error about an illegal quantifier it almost always means you have a quantifier where it doesn't belong.
Read more >
How to Fix 'Nothing to repeat' Errors in JavaScript - Webtips
In order to fix the error, locate where the error is originating from, and then verify that the regular expression that you are...
Read more >
Quantifiers in Regular Expressions - Microsoft Learn
The regular expression fails to match the first number because the * quantifier tries to match the previous element as many times as...
Read more >
Regular Expression HOWTO — Python 3.11.1 documentation
The solution is to use Python's raw string notation for regular expressions; backslashes are not handled in any special way in a string...
Read more >
GLib.RegexError
Error codes returned by regular expressions functions. ... Numbers out of order in “{}” quantifier. ... Invalid escape sequence in character class.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found