2016-11-23 53 views
0

這裏是我的安裝輸出:如何安裝語義UI?

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

初始後「故宮安裝」錯誤集我執行「故宮更新minimatch」,其次是「故宮安裝」,這得到了過去的第一個錯誤,但在相同的錯誤失敗gulp再次安裝:「SyntaxError:無效的正則表達式:」。我也更新了graceful-fs並再次運行「npm install」,結果相同。

我minimatch的的package.json:

{ 
    "_args": [ 
    [ 
     "[email protected]^3.0.2", 
     "C:\\Stash-repo\\bs\\node_modules\\glob" 
    ] 
    ], 
    "_from": "[email protected]>=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": "[email protected]^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": "[email protected]^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今天列爲當前版本。錯誤提示我需要minimatch 3.0.2或更高版本。因爲我有3.0.3,它不起作用,我如何安裝semantic-ui?

回答

1

我意識到這是一個老的文章,但希望它的有用..

我有同樣的問題。通過設置CLI_WIDTH固定爲每this issue

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.

NPM安裝然後去過去

SyntaxError: Invalid regular expression: /.{1,0}/:

0

,如果你使用的是Windows,而不是運行它機智的Git的bash,嘗試用CMD以管理員身份來運行它,這對我有效。