Как установить семантический пользовательский интерфейс?

Вот мой вывод установки:

$ npm install semantic-ui
npm WARN excluding symbolic link tests\withsymlinks\.hidden -> ../shown/.hidden
npm WARN excluding symbolic link tests\withsymlinks\bar.txt -> ../shown/bar.txt
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN install Couldn't install optional dependency: Unsupported
npm WARN excluding symbolic link tests\withsymlinks\.hidden -> ../shown/.hidden
npm WARN excluding symbolic link tests\withsymlinks\bar.txt -> ../shown/bar.txt

> [email protected] install C:\Stash-repo\bs\node_modules\semantic-ui
> gulp install

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


$ npm update minimatch

$ npm install semantic-ui
npm WARN install Couldn't install optional dependency: Unsupported

> [email protected] install C:\Stash-repo\bs\node_modules\semantic-ui
> gulp install

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


$ npm update graceful-fs

$ npm install semantic-ui
npm WARN install Couldn't install optional dependency: Unsupported

> [email protected] install C:\Stash-repo\bs\node_modules\semantic-ui
> gulp install

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

После первоначальной ошибки «npm install» я выполнил «npm update minimatch», а затем «npm install», который преодолел первые ошибки, но снова потерпел неудачу с той же ошибкой при установке gulp: «SyntaxError: Недопустимое регулярное выражение:». Я также обновил Graceful-FS и снова запустил «npm install» с теми же результатами.

Мой мини-матч package.json:

{
  "_args": [
    [
      "minimatch@^3.0.2",
      "C:\\Stash-repo\\bs\\node_modules\\glob"
    ]
  ],
  "_from": "minimatch@>=3.0.2 <4.0.0",
  "_id": "[email protected]",
  "_inCache": true,
  "_location": "/minimatch",
  "_nodeVersion": "4.4.4",
  "_npmOperationalInternal": {
    "host": "packages-12-west.internal.npmjs.com",
    "tmp": "tmp/minimatch-3.0.3.tgz_1470678322731_0.1892083385027945"
  },
  "_npmUser": {
    "email": "[email protected]",
    "name": "isaacs"
  },
  "_npmVersion": "3.10.6",
  "_phantomChildren": {},
  "_requested": {
    "name": "minimatch",
    "raw": "minimatch@^3.0.2",
    "rawSpec": "^3.0.2",
    "scope": null,
    "spec": ">=3.0.2 <4.0.0",
    "type": "range"
  },
  "_requiredBy": [
    "/glob",
    "/gulp-match",
    "/readdirp",
    "/rework-import/glob"
  ],
  "_resolved": "http://npm.pacden.com/minimatch/-/minimatch-3.0.3.tgz",
  "_shasum": "2a4e4090b96b2db06a9d7df01055a62a77c9b774",
  "_shrinkwrap": null,
  "_spec": "minimatch@^3.0.2",
  "_where": "C:\\Stash-repo\\bs\\node_modules\\glob",
  "author": {
    "email": "[email protected]",
    "name": "Isaac Z. Schlueter",
    "url": "http://blog.izs.me"
  },
  "bugs": {
    "url": "https://github.com/isaacs/minimatch/issues"
  },
  "dependencies": {
    "brace-expansion": "^1.0.0"
  },
  "description": "a glob matcher in javascript",
  "devDependencies": {
    "standard": "^3.7.2",
    "tap": "^5.6.0"
  },
  "directories": {},
  "dist": {
    "shasum": "2a4e4090b96b2db06a9d7df01055a62a77c9b774",
    "tarball": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz"
  },
  "engines": {
    "node": "*"
  },
  "files": [
    "minimatch.js"
  ],
  "gitHead": "eed89491bd4a4e6bc463aac0dfb5c29ef0d1dc13",
  "homepage": "https://github.com/isaacs/minimatch#readme",
  "installable": true,
  "license": "ISC",
  "main": "minimatch.js",
  "maintainers": [
    {
      "name": "isaacs",
      "email": "[email protected]"
    }
  ],
  "name": "minimatch",
  "optionalDependencies": {},
  "repository": {
    "type": "git",
    "url": "git://github.com/isaacs/minimatch.git"
  },
  "scripts": {
    "posttest": "standard minimatch.js test/*.js",
    "test": "tap test/*.js"
  },
  "version": "3.0.3"
}

Это говорит мне о том, что у меня установлен minimatch 3.0.3, который сегодня указан на npmjs.org как текущая версия. Ошибка предполагает, что мне нужен миниматч 3.0.2 или выше. Поскольку у меня 3.0.3 и он не работает, как мне установить semantic-ui?


person lynnjwalker    schedule 23.11.2016    source источник


Ответы (2)


Я понимаю, что это старый пост, но надеюсь, что он будет полезен.

У меня такая же проблема. Исправлено путем установки CLI_WIDTH в соответствии с этой проблемой.

Изучая библиотеку cli-width, я заметил, что она ищет переменную среды с именем CLI_WIDTH. Таким образом, исправление просто устанавливает для этой переменной число больше 1.

установка npm затем прошла мимо

SyntaxError: Недопустимое регулярное выражение: /.{1,0}/:

person Jason    schedule 18.01.2017

если вы используете окна, вместо того, чтобы запускать его с помощью Git bash, попробуйте запустить его с помощью cmd от имени администратора, это сработало для меня.

person user3175081    schedule 01.03.2017