yarnpkg / yarn

The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry
https://classic.yarnpkg.com
Other
41.44k stars 2.73k forks source link

Invalid URI "https/****" #6182

Closed zhonggithub closed 6 years ago

zhonggithub commented 6 years ago

when yarn add async-busboy. this error happen:

Arguments: /usr/local/bin/node /usr/local/bin/yarn install

PATH: /Users/zz/.rvm/gems/ruby-2.3.1/bin:/Users/zz/.rvm/gems/ruby-2.3.1@global/bin:/Users/zz/.rvm/rubies/ruby-2.3.1/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/opt/X11/bin:/Applications/Wireshark.app/Contents/MacOS:/Users/zz/.rvm/gems/ruby-2.3.1/bin:/Users/zz/.rvm/gems/ruby-2.3.1@global/bin:/Users/zz/.rvm/rubies/ruby-2.3.1/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/Users/zz/.rvm/bin

Yarn version: 1.9.2

Node version: 8.11.3

Platform: darwin x64

Trace: Error: https/async-busboy: Invalid URI "https/async-busboy" at Request.module.exports.Request.init (/usr/local/lib/node_modules/yarn/lib/cli.js:137504:31) at new Request (/usr/local/lib/node_modules/yarn/lib/cli.js:137358:8) at request (/usr/local/lib/node_modules/yarn/lib/cli.js:126633:10) at RequestManager.execute (/usr/local/lib/node_modules/yarn/lib/cli.js:64202:15) at RequestManager.shiftQueue (/usr/local/lib/node_modules/yarn/lib/cli.js:64229:10) at /usr/local/lib/node_modules/yarn/lib/cli.js:63980:13 at new Promise () at new F (/usr/local/lib/node_modules/yarn/lib/cli.js:23624:28) at RequestManager.request (/usr/local/lib/node_modules/yarn/lib/cli.js:63978:19) at NpmRegistry.request (/usr/local/lib/node_modules/yarn/lib/cli.js:33715:32)

npm manifest: { "name": "app", "version": "1.0.0", "description": "", "main": "app.js", "scripts": { "start": "cross-env NODE_ENV=production node dist/app.js", "lint": "eslint src/", "prebuild": "npm run lint && rm -rf dist/", "build": "babel --out-dir dist src", "test": "cross-env NODE_ENV=test nyc ava", "dev": "cross-env NODE_ENV=dev nodemon --config ./nodemon.js --delay 2.5 --exec babel-node -- src/app.js" }, "author": "", "license": "ISC", "dependencies": { "async-busboy": "^0.6.2", "baidu-aip-sdk": "^2.3.1", "bunyan": "^1.8.12", "dotenv": "^2.0.0", "ioredis": "^3.0.0", "jsonwebtoken": "^8.2.1", "koa": "^2.0.0", "koa-bunyan-logger": "^1.3.0", "koa-convert": "^1.2.0", "koa-multer": "^1.0.2", "koa-router": "^7.1.0", "koa-session2": "^2.2.4", "koa-static-cache": "^5.0.0", "koa2-cors": "^2.0.2", "lodash": "^4.17.4", "md5-file": "^4.0.0", "mkdirp": "^0.5.1", "moment": "^2.18.1", "raw-body": "^2.2.0", "rsmq-worker": "^0.5.2", "seneca-extended": "^1.3.6", "socket.io-client": "^2.1.1", "svg-captcha": "^1.3.11", "uuid": "^3.2.1", "winston": "^2.3.1", "z-error": "^1.0.7" }, "devDependencies": { "ava": "^0.17.0", "babel-cli": "^6.18.0", "babel-eslint": "^7.1.1", "babel-plugin-istanbul": "^3.1.2", "babel-preset-es2015-node6": "^0.4.0", "babel-preset-stage-0": "^6.16.0", "cross-env": "^3.1.4", "eslint": "^3.12.2", "eslint-config-airbnb-base": "^11.0.0", "eslint-plugin-import": "^2.2.0", "nyc": "^10.0.0", "supertest": "^2.0.1" }, "ava": { "babel": "inherit" }, "nyc": { "require": [ "babel-register" ], "include": [ "src/" ], "sourceMap": false, "instrument": false } }

yarn manifest: No manifest

Lockfile: No lockfile

DanielRuf commented 6 years ago

I can not reproduce it with Node.js 10

yarn add async-busboy
yarn add v1.9.2
info No lockfile found.
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[---------] 0/9(node:19737) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
[3/4] 🔗  Linking dependencies...
[4/4] 📃  Building fresh packages...

success Saved lockfile.
success Saved 8 new dependencies.
info Direct dependencies
└─ async-busboy@0.6.2
info All dependencies
├─ async-busboy@0.6.2
├─ busboy@0.2.14
├─ core-util-is@1.0.2
├─ dicer@0.2.5
├─ inherits@2.0.3
├─ isarray@0.0.1
├─ streamsearch@0.1.2
└─ string_decoder@0.10.31
✨  Done in 1.69s.
DanielRuf commented 6 years ago

Can you try if yarn or yarn install works? Are there any errors in yarn.lock?

zhonggithub commented 6 years ago

@DanielRuf yes , i try yarn install. the same error. this error happen after update yarn version from 1.7 to 1.9 i uninstall yarn and then install yarn. result is the same error. npm is work. i do not konw why report " Invalid URI "https/async-busboy" error .

zhonggithub commented 6 years ago

when I remove file: .npmrc . it's working. the file set registry=https @DanielRuf thank you!

DanielRuf commented 6 years ago

Ok then please close the issue as this is resolved and was due to a wrong npm config file.