No matching version found for ajv@^6.5.5

npm install gulp-sass的时候出现了这些错误

npm WARN deprecated lodash.assign@4.2.0: This package is deprecated. Use Object.assign.
npm ERR! code ETARGET
npm ERR! notarget No matching version found for ajv@^6.5.5
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget 
npm ERR! notarget It was specified as a dependency of 'har-validator'
npm ERR! notarget 

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/yiyinglu/.npm/_logs/2018-11-08T03_55_23_559Z-debug.log

好呗,那我就npm install ajv@^6.5.5。然而不行。

npm ERR! code ETARGET
npm ERR! notarget No matching version found for ajv@^6.5.5
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/yiyinglu/.npm/_logs/2018-11-08T03_57_43_195Z-debug.log

在此之前我用yarn来install sass,因为找不到ajv@^ 6.5.5所以可以选择ajv@^ 6.5.4,不过还是会报错T0T

error /Users/yiyinglu/Documents/work/git/qz-web/weishi-manager/admin/theme/node_modules/node-sass: Command failed.
Exit code: 1
Command: node scripts/build.js
Arguments: 
Directory: /Users/yiyinglu/Documents/work/git/qz-web/weishi-manager/admin/theme/node_modules/node-sass
Output:
Building: /usr/local/bin/node /Users/yiyinglu/Documents/work/git/qz-web/weishi-manager/admin/theme/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ '/usr/local/bin/node',
gyp verb cli   '/Users/yiyinglu/Documents/work/git/qz-web/weishi-manager/admin/theme/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library=' ]
gyp info using node-gyp@3.7.0
gyp info using node@10.13.0 | darwin | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed     at getNotFoundError (/Users/yiyinglu/Documents/work/git/qz-web/weishi-manager/admin/theme/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/Users/yiyinglu/Documents/work/git/qz-web/weishi-manager/admin/theme/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/Users/yiyinglu/Documents/work/git/qz-web/weishi-manager/admin/theme/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /Users/yiyinglu/Documents/work/git/qz-web/weishi-manager/admin/theme/node_modules/which/which.js:89:16
gyp verb `which` failed     at /Users/yiyinglu/Documents/work/git/qz-web/weishi-manager/admin/theme/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /Users/yiyinglu/Documents/work/git/qz-web/weishi-manager/admin/theme/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:154:21)
gyp verb `which` failed  python2 { Error: not found: python2
gyp verb `which` failed     at getNotFoundError (/Users/yiyinglu/Documents/work/git/qz-web/weishi-manager/admin/theme/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/Users/yiyinglu/Documents/work/git/qz-web/weishi-manager/admin/theme/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/Users/yiyinglu/Documents/work/git/qz-web/weishi-manager/admin/theme/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /Users/yiyinglu/Documents/work/git/qz-web/weishi-manager/admin/theme/node_modules/which/which.js:89:16
gyp verb `which` failed     at /Users/yiyinglu/Documents/work/git/qz-web/weishi-manager/admin/theme/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /Users/yiyinglu/Documents/work/git/qz-web/weishi-manager/admin/theme/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:154:21)
gyp verb `which` failed   stack:
gyp verb `which` failed    'Error: not found: python2\n    at getNotFoundError (/Users/yiyinglu/Documents/work/git/qz-web/weishi-manager/admin/theme/node_modules/which/which.js:13:12)\n    at F (/Users/yiyinglu/Documents/work/git/qz-web/weishi-manager/admin/theme/node_modules/which/which.js:68:19)\n    at E (/Users/yiyinglu/Documents/work/git/qz-web/weishi-manager/admin/theme/node_modules/which/which.js:80:29)\n    at /Users/yiyinglu/Documents/work/git/qz-web/weishi-manager/admin/theme/node_modules/which/which.js:89:16\n    at /Users/yiyinglu/Documents/work/git/qz-web/weishi-manager/admin/theme/node_modules/isexe/index.js:42:5\n    at /Users/yiyinglu/Documents/work/git/qz-web/weishi-manager/admin/theme/node_modules/isexe/mode.js:8:5\n    at FSReqWrap.oncomplete (fs.js:154:21)',
gyp verb `which` failed   code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python /usr/bin/python
gyp verb check python version `/usr/bin/python -c "import platform; print(platform.python_version());"` returned: "2.7.10\n"
gyp verb get node dir no --target version specified, falling back to host node version: 10.13.0
gyp verb command install [ '10.13.0' ]
gyp verb install input version string "10.13.0"
gyp verb install installing version: 10.13.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version not already installed, continuing with install 10.13.0
gyp verb ensuring nodedir is created /Users/yiyinglu/.node-gyp/10.13.0
gyp verb created nodedir /Users/yiyinglu/.node-gyp/10.13.0
gyp http GET https://nodejs.org/download/release/v10.13.0/node-v10.13.0-headers.tar.gz
gyp verb download using proxy url: "http://dev-proxy.oa.com:8080"
gyp WARN install got an error, rolling back install
gyp verb command remove [ '10.13.0' ]
gyp verb remove using node-gyp dir: /Users/yiyinglu/.node-gyp
gyp verb remove removing target version: 10.13.0
gyp verb remove removing development files for version: 10.13.0
gyp ERR! configure error 
gyp ERR! stack Error: tunneling socket could not be established, statusCode=504
gyp ERR! stack     at ClientRequest.onConnect (/Users/yiyinglu/Documents/work/git/qz-web/weishi-manager/admin/theme/node_modules/tunnel-agent/index.js:166:19)
gyp ERR! stack     at Object.onceWrapper (events.js:273:13)
gyp ERR! stack     at ClientRequest.emit (events.js:182:13)
gyp ERR! stack     at Socket.socketOnData (_http_client.js:474:11)
gyp ERR! stack     at Socket.emit (events.js:182:13)
gyp ERR! stack     at addChunk (_stream_readable.js:283:12)
gyp ERR! stack     at readableAddChunk (_stream_readable.js:264:11)
gyp ERR! stack     at Socket.Readable.push (_stream_readable.js:219:10)
gyp ERR! stack     at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
gyp ERR! System Darwin 18.2.0
gyp ERR! command "/usr/local/bin/node" "/Users/yiyinglu/Documents/work/git/qz-web/weishi-manager/admin/theme/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/yiyinglu/Documents/work/git/qz-web/weishi-manager/admin/theme/node_modules/node-sass
gyp ERR! node -v v10.13.0
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok 
Build failed with error code: 1

有看到类似情况的,https://github.com/sass/node-sass/issues/1781
折腾了半天,没搞定。
好咯,我们转回用npm 吧,绕不过ajv@^6.5.5,然后我就找类似情况的https://stackoverflow.com/questions/44331005/npm-error-no-matching-version-found-for

The version you have specified, or one of your dependencies has specified is not published to npmjs.com
Executing npm view ionic-native (see docs) the following output is returned for package versions:
As you can see no version higher than 2.9.0 has been published to the npm repository. Strangely they have versions higher than this on GitHub.

好呗,我也来

npm view ajv
ajv@6.5.5 | MIT | deps: 4 | versions: 269
Another JSON Schema Validator
https://github.com/epoberezkin/ajv

dist
.tarball: http://r.tnpm.oa.com/ajv/download/ajv-6.5.5.tgz
.shasum: cf97cdade71c6399a92c6d6c4177381291b781a1

dependencies:
fast-deep-equal: ^2.0.1            fast-json-stable-stringify: ^2.0.0 json-schema-traverse: ^0.4.1       uri-js: ^4.2.2                     

maintainers:
- blakeembrey <hello@blakeembrey.com>
- esp <e.poberezkin@me.com>

dist-tags:
4.x: 4.11.8       beta: 6.0.0-rc.1  latest: 6.5.5     

published 3 days ago by esp <e.poberezkin@me.com>

然后直接install

npm isntall http://r.tnpm.oa.com/ajv/download/ajv-6.5.5.tgz

。。。。。
哇奇迹发生了! 安装成功~
后续就接着装sass,也OK了~!呜呜呜搞定。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 215,463评论 6 497
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 91,868评论 3 391
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 161,213评论 0 351
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 57,666评论 1 290
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 66,759评论 6 388
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 50,725评论 1 294
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 39,716评论 3 415
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 38,484评论 0 270
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 44,928评论 1 307
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 37,233评论 2 331
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 39,393评论 1 345
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 35,073评论 5 340
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 40,718评论 3 324
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 31,308评论 0 21
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 32,538评论 1 268
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 47,338评论 2 368
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 44,260评论 2 352

推荐阅读更多精彩内容