Semantic-UI: [Build Tools] Error running setup on Windows 10

$ npm install semantic-ui --save-dev
npm WARN deprecated gulp-minify-css@1.2.4: Please use gulp-clean-css
npm WARN excluding symbolic link tests\withsymlinks\.hidden -> ../shown/.hidden
npm WARN excluding symbolic link tests\withsymlinks\bar.txt -> ../shown/bar.txt
npm WARN excluding symbolic link tests\withsymlinks\.hidden -> ../shown/.hidden
npm WARN excluding symbolic link tests\withsymlinks\bar.txt -> ../shown/bar.txt
npm WARN prefer global js-beautify@1.5.10 should be installed with -g

> semantic-ui@2.2.2 install C:\Users\Francis\Documents\PHPStorm\BabyShowers\node_modules\semantic-ui
> gulp install

[17:13:23] Using gulpfile ~\Documents\PHPStorm\BabyShowers\node_modules\semantic-ui\gulpfile.js
[17:13:23] Starting 'install'...
[17:13: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) [17:13:23] 'run setup' errored after 52 ms
[17:13:23] SyntaxError: Invalid regular expression: /.{1,0}/: numbers out of order in {} quantifier.
    at new RegExp (native)
    at breakLines (C:\Users\Francis\Documents\PHPStorm\BabyShowers\node_modules\inquirer\lib\utils\screen-manager.js:108:15)
    at ScreenManager.render (C:\Users\Francis\Documents\PHPStorm\BabyShowers\node_modules\inquirer\lib\utils\screen-manager.js:55:22)
    at Prompt.render (C:\Users\Francis\Documents\PHPStorm\BabyShowers\node_modules\inquirer\lib\prompts\list.js:103:15)
    at Prompt._run (C:\Users\Francis\Documents\PHPStorm\BabyShowers\node_modules\inquirer\lib\prompts\list.js:74:8)
    at Prompt.run (C:\Users\Francis\Documents\PHPStorm\BabyShowers\node_modules\inquirer\lib\prompts\base.js:57:8)
    at Object.<anonymous> (C:\Users\Francis\Documents\PHPStorm\BabyShowers\node_modules\inquirer\lib\ui\prompt.js:84:12)
    at module.exports (C:\Users\Francis\Documents\PHPStorm\BabyShowers\node_modules\run-async\index.js:15:21)
    at AnonymousObservable.__subscribe (C:\Users\Francis\Documents\PHPStorm\BabyShowers\node_modules\inquirer\lib\utils\utils.js:16:7)
    at AnonymousObservable.tryCatcher (C:\Users\Francis\Documents\PHPStorm\BabyShowers\node_modules\rx-lite\rx.lite.js:63:31)
[17:13:23] 'install' errored after 59 ms
[17:13: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 (native)
    at breakLines (C:\Users\Francis\Documents\PHPStorm\BabyShowers\node_modules\inquirer\lib\utils\screen-manager.js:108:15)
    at ScreenManager.render (C:\Users\Francis\Documents\PHPStorm\BabyShowers\node_modules\inquirer\lib\utils\screen-manager.js:55:22)
    at Prompt.render (C:\Users\Francis\Documents\PHPStorm\BabyShowers\node_modules\inquirer\lib\prompts\list.js:103:15)
    at Prompt._run (C:\Users\Francis\Documents\PHPStorm\BabyShowers\node_modules\inquirer\lib\prompts\list.js:74:8)
    at Prompt.run (C:\Users\Francis\Documents\PHPStorm\BabyShowers\node_modules\inquirer\lib\prompts\base.js:57:8)
    at Object.<anonymous> (C:\Users\Francis\Documents\PHPStorm\BabyShowers\node_modules\inquirer\lib\ui\prompt.js:84:12)
    at module.exports (C:\Users\Francis\Documents\PHPStorm\BabyShowers\node_modules\run-async\index.js:15:21)
    at AnonymousObservable.__subscribe (C:\Users\Francis\Documents\PHPStorm\BabyShowers\node_modules\inquirer\lib\utils\utils.js:16:7)
    at AnonymousObservable.tryCatcher (C:\Users\Francis\Documents\PHPStorm\BabyShowers\node_modules\rx-lite\rx.lite.js:63:31)

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 7
  • Comments: 25 (2 by maintainers)

Most upvoted comments

I’ve maybe found a solution. Actually I was running npm through Git Bash, so I tried to run it again with the cmd (with administrator privileges) and It worked…

I think that I’ve tracked this down:

  • gulp-prompt@0.20 is depends on inquirer@0.10.1
  • inquirer@0.10.1 depends on cli-width and 0.10.1 version don’t handle correctly when cli-width returns 0 in some environments;

Inspecting the cli-width library I’ve noticed that it look for an environment variable named CLI_WIDTH. So the fix is just set this variable to a number greater than 1.

Same error, Running on windows 10, I’ve tried multiple version of Node from 2.X to 6.X all give me same error.

This seems to happen to me only in git bash, using windows cmd (bahh) I get no errors.

I have same issue on Win 10. There are 2 ways how to run npm install:

  1. downgrade Semantic-Org/Semantic-UI from current 2.2.7 to 2.1.8
  2. or run npm install on version 2.2.7 from cmd but as Administrator

After several failed attempts I managed to successfully install semantic ui on windows 10. I’m not sure if the 2nd step helped or not but these are the adjustment I made:

  1. run cmd in administrative mode;
  2. set the answer to “Should we set permissions on outputted files” to no;

Also on Windows 10, same error. Version 2.1.8 does allow me to install but doesn’t allow me to use the arrow keys to change configuration settings.

I am using git bash with the standard settings.

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.

I have the same error!!! I use git bash, but I can not solve this problem. From the error, it shows regex in inquirer.js. I run “npm update inquirer”, this error disappears but I encounter other problem.

Then I use the cmd as an administrator. But still get regex error. I run “npm update inquirer”, next “npm install semantic-ui”, it works!

OS: win10 x64 git bash: can not solve this error cmd(admin): “npm install semantic-ui”------>“npm update inquirer”--------->“npm install semantic-ui” --------> it works

The same error on win10, node.js 6:

? 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) [18:34:16] ‘run setup’ errored after 45 ms [18:34:16] SyntaxError: Invalid regular expression: /.{1,0}/: numbers out of order in {} quantifier at RegExp (native) at breakLines (E:\My_Projects\Java\Work_Space_For_IDEA\eefung\eefung-website-nodejs\node_modules\inquirer\lib\utils\screen-manager.js:108:15) at ScreenManager.render (E:\My_Projects\Java\Work_Space_For_IDEA\eefung\eefung-website-nodejs\node_modules\inquirer\lib\utils\screen-manager.js:55:22) at Prompt.render (E:\My_Projects\Java\Work_Space_For_IDEA\eefung\eefung-website-nodejs\node_modules\inquirer\lib\prompts\list.js:103:15) at Prompt._run (E:\My_Projects\Java\Work_Space_For_IDEA\eefung\eefung-website-nodejs\node_modules\inquirer\lib\prompts\list.js:74:8) at Prompt.run (E:\My_Projects\Java\Work_Space_For_IDEA\eefung\eefung-website-nodejs\node_modules\inquirer\lib\prompts\base.js:57:8) at Object.<anonymous> (E:\My_Projects\Java\Work_Space_For_IDEA\eefung\eefung-website-nodejs\node_modules\inquirer\lib\ui\prompt.js:84:12) at module.exports (E:\My_Projects\Java\Work_Space_For_IDEA\eefung\eefung-website-nodejs\node_modules\run-async\index.js:15:21) at AnonymousObservable.__subscribe (E:\My_Projects\Java\Work_Space_For_IDEA\eefung\eefung-website-nodejs\node_modules\inquirer\lib\utils\utils.js:16:7) at AnonymousObservable.tryCatcher (E:\My_Projects\Java\Work_Space_For_IDEA\eefung\eefung-website-nodejs\node_modules\rx-lite\rx.lite.js:63:31) [18:34:16] ‘install’ errored after 51 ms [18:34:16] SyntaxError in plugin 'run-sequence(run s

I can replicate this in Ubuntu 16.04 with this Dockerfile:

FROM ubuntu:16.04

RUN apt-get update && apt-get install -y build-essential curl
RUN curl -sL https://deb.nodesource.com/setup_4.x | bash -
RUN apt-get install -y nodejs
RUN npm install -g gulp
RUN npm install semantic-ui@2.2.0

And the fix, as @Clindbergh mentioned, is to use 2.1.8 instead.

Same problem on Win7. No success with v2.2.0, but 2.1.8 works. The error happens after

Automatic (Use defaults locations and all components) Express (Set components and output folder) Custom (Customize all src/dist values)

is printed but before any user interaction (did not press ENTER)