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

Created on 14 May 2017  ยท  11Comments  ยท  Source: Semantic-Org/Semantic-UI

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:

> [email protected] 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

Build Tools Cannot Reproduce stale

Most helpful comment

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

All 11 comments

Also I've tested old version:

FROM node:latest

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

RUN npm install -g gulp
RUN npm install [email protected] --save

And it works. So problem is somewhere between 2.1.8 and 2.2.10.

Same here, anyone working on this ?

I've commented on other thread, but I've been unable to reproduce with either win 10 or linux with npm5.

https://github.com/Semantic-Org/Semantic-UI/issues/4292#issuecomment-312510692

@jlukic could you show your nodejs --version and npm --version please?

@jlukic I've tried just now with fresh Docker image. Still same issue.

Versions:

  • nodejs --version: v8.1.2
  • npm --version: 5.0.3

Steps to reproduce (if you are don't know anything about Docker):

  1. Install Docker with official guide: https://docs.docker.com/engine/installation/
  2. Create empty directory
  3. Create file named Dockerfile here and place this content:
    Dockerfile FROM node:latest RUN nodejs --version RUN npm --version RUN npm install semantic-ui --save
  4. Run command docker build --pull . in this directory
  5. You'll get an error:
> [email protected] install /node_modules/semantic-ui
> gulp install

[07:18:28] Using gulpfile /node_modules/semantic-ui/gulpfile.js
[07:18:28] Starting 'install'...

[07:18:28] 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) [07:18:28] 'run setup' errored after 23 ms
[07:18:28] SyntaxError: Invalid regular expression: /.{1,0}/: numbers out of order in {} quantifier
    at RegExp (<anonymous>)
    at breakLines (/node_modules/inquirer/lib/utils/screen-manager.js:108:15)
    at module.exports.ScreenManager.render (/node_modules/inquirer/lib/utils/screen-manager.js:55:22)
    at Prompt.render (/node_modules/inquirer/lib/prompts/list.js:103:15)
    at Prompt._run (/node_modules/inquirer/lib/prompts/list.js:74:8)
    at Prompt.run (/node_modules/inquirer/lib/prompts/base.js:57:8)
    at Object.<anonymous> (/node_modules/inquirer/lib/ui/prompt.js:84:12)
    at module.exports (/node_modules/run-async/index.js:15:21)
    at AnonymousObservable.__subscribe (/node_modules/inquirer/lib/utils/utils.js:16:7)
    at AnonymousObservable.tryCatcher (/node_modules/rx-lite/rx.lite.js:63:31)
[07:18:28] 'install' errored after 26 ms
[07:18:28] 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 RegExp (<anonymous>)
    at breakLines (/node_modules/inquirer/lib/utils/screen-manager.js:108:15)
    at module.exports.ScreenManager.render (/node_modules/inquirer/lib/utils/screen-manager.js:55:22)
    at Prompt.render (/node_modules/inquirer/lib/prompts/list.js:103:15)
    at Prompt._run (/node_modules/inquirer/lib/prompts/list.js:74:8)
    at Prompt.run (/node_modules/inquirer/lib/prompts/base.js:57:8)
    at Object.<anonymous> (/node_modules/inquirer/lib/ui/prompt.js:84:12)
    at module.exports (/node_modules/run-async/index.js:15:21)
    at AnonymousObservable.__subscribe (/node_modules/inquirer/lib/utils/utils.js:16:7)
    at AnonymousObservable.tryCatcher (/node_modules/rx-lite/rx.lite.js:63:31)
npm info lifecycle [email protected]~install: Failed to exec install script
npm WARN enoent ENOENT: no such file or directory, open '/package.json'
npm WARN !invalid#1 No description
npm WARN !invalid#1 No repository field.
npm WARN !invalid#1 No README data
npm WARN !invalid#1 No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `gulp install`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2017-07-03T07_18_32_947Z-debug.log
The command '/bin/sh -c npm install semantic-ui --save' returned a non-zero code: 1

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

@jlukic local install, i choose "yes" or "enter":
OSX
node v6.9.4
npm 3.10.10

......
? Set-up Semantic UI Automatic (Use defaults locations and all components)
?     
    We detected you are using NPM. Nice!  
    Is this your project folder?
    /Users/ed/workspace/my/test 
 (Use arrow keys)
  Yes 
  No, let me specify 

readline.js:982
            throw err;
            ^

TypeError: Cannot read property 'name' of undefined
    at Prompt.render (/Users/ed/workspace/my/test/node_modules/inquirer/lib/prompts/list.js:95:69)
......

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

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.

anyone working on this ?

anyone working on this ?
hi, i still working on this .

Was this page helpful?
0 / 5 - 0 ratings

Related issues

davialexandre picture davialexandre  ยท  3Comments

mixerp picture mixerp  ยท  3Comments

deneuxa picture deneuxa  ยท  3Comments

arj-196 picture arj-196  ยท  3Comments

kntmrkm picture kntmrkm  ยท  3Comments