Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken support for multiple --scope arguments #1592

Closed
LeZuse opened this issue Aug 21, 2018 · 3 comments · Fixed by JetBrains/ring-ui#370
Closed

Broken support for multiple --scope arguments #1592

LeZuse opened this issue Aug 21, 2018 · 3 comments · Fixed by JetBrains/ring-ui#370
Assignees

Comments

@LeZuse
Copy link

LeZuse commented Aug 21, 2018

Expected Behavior

Lerna adds/updates a package in the specified packages. Instead it throws an error. This worked before.

Steps to Reproduce (for bugs)

$ lerna add webpack-serve --dev --scope=app1 --scope=app2
lerna notice cli v3.1.2
lerna info versioning independent
lerna ERR! TypeError: opts.scope.replace is not a function
lerna ERR!     at Function.pickRegistry (/Users/zuse/.nvm/versions/node/v9.5.0/lib/node_modules/lerna/node_modules/npm-registry-fetch/index.js:114:32)
lerna ERR!     at packument (/Users/zuse/.nvm/versions/node/v9.5.0/lib/node_modules/lerna/node_modules/pacote/lib/fetchers/registry/packument.js:17:26)
lerna ERR!     at getManifest (/Users/zuse/.nvm/versions/node/v9.5.0/lib/node_modules/lerna/node_modules/pacote/lib/fetchers/registry/manifest.js:19:10)
lerna ERR!     at manifest (/Users/zuse/.nvm/versions/node/v9.5.0/lib/node_modules/lerna/node_modules/pacote/lib/fetchers/registry/manifest.js:13:10)
lerna ERR!     at Object.manifest (/Users/zuse/.nvm/versions/node/v9.5.0/lib/node_modules/lerna/node_modules/pacote/lib/fetchers/registry/index.js:17:12)
lerna ERR!     at Object.Fetcher#manifest [as manifest] (/Users/zuse/.nvm/versions/node/v9.5.0/lib/node_modules/lerna/node_modules/genfun/lib/genfun.js:15:38)
lerna ERR!     at manifest (/Users/zuse/.nvm/versions/node/v9.5.0/lib/node_modules/lerna/node_modules/pacote/lib/fetch.js:23:18)
lerna ERR!     at pinflight (/Users/zuse/.nvm/versions/node/v9.5.0/lib/node_modules/lerna/node_modules/pacote/manifest.js:24:12)
lerna ERR!     at /Users/zuse/.nvm/versions/node/v9.5.0/lib/node_modules/lerna/node_modules/promise-inflight/inflight.js:29:24
lerna ERR!     at Promise._execute (/Users/zuse/.nvm/versions/node/v9.5.0/lib/node_modules/lerna/node_modules/bluebird/js/release/debuggability.js:303:9)
lerna ERR!     at Promise._resolveFromExecutor (/Users/zuse/.nvm/versions/node/v9.5.0/lib/node_modules/lerna/node_modules/bluebird/js/release/promise.js:483:18)
lerna ERR!     at new Promise (/Users/zuse/.nvm/versions/node/v9.5.0/lib/node_modules/lerna/node_modules/bluebird/js/release/promise.js:79:10)
lerna ERR!     at _inflight (/Users/zuse/.nvm/versions/node/v9.5.0/lib/node_modules/lerna/node_modules/promise-inflight/inflight.js:28:25)
lerna ERR!     at /Users/zuse/.nvm/versions/node/v9.5.0/lib/node_modules/lerna/node_modules/promise-inflight/inflight.js:22:14
lerna ERR!     at tryCatcher (/Users/zuse/.nvm/versions/node/v9.5.0/lib/node_modules/lerna/node_modules/bluebird/js/release/util.js:16:23)
lerna ERR! lerna opts.scope.replace is not a function
lerna.json

{
  "lerna": "2.9.0",
  "version": "independent",
  "packages": ["apps/*"],
  "npmClient": "yarn",
  "useWorkspaces": true
}

lerna-debug.log

0 silly argv { _: [ 'add' ],
0 silly argv   progress: true,
0 silly argv   ci: false,
0 silly argv   dev: true,
0 silly argv   D: true,
0 silly argv   scope: [ 'portal', 'main' ],
0 silly argv   loglevel: 'info',
0 silly argv   globs: [],
0 silly argv   lernaVersion: '3.1.2',
0 silly argv   '$0': 'lerna',
0 silly argv   pkg: 'webpack-serve' }
1 notice cli v3.1.2
2 verbose rootPath /Users/zuse/Projects/pb-frontend
3 info versioning independent
4 error TypeError: opts.scope.replace is not a function
4 error     at Function.pickRegistry (/Users/zuse/.nvm/versions/node/v9.5.0/lib/node_modules/lerna/node_modules/npm-registry-fetch/index.js:114:32)
4 error     at packument (/Users/zuse/.nvm/versions/node/v9.5.0/lib/node_modules/lerna/node_modules/pacote/lib/fetchers/registry/packument.js:17:26)
4 error     at getManifest (/Users/zuse/.nvm/versions/node/v9.5.0/lib/node_modules/lerna/node_modules/pacote/lib/fetchers/registry/manifest.js:19:10)
4 error     at manifest (/Users/zuse/.nvm/versions/node/v9.5.0/lib/node_modules/lerna/node_modules/pacote/lib/fetchers/registry/manifest.js:13:10)
4 error     at Object.manifest (/Users/zuse/.nvm/versions/node/v9.5.0/lib/node_modules/lerna/node_modules/pacote/lib/fetchers/registry/index.js:17:12)
4 error     at Object.Fetcher#manifest [as manifest] (/Users/zuse/.nvm/versions/node/v9.5.0/lib/node_modules/lerna/node_modules/genfun/lib/genfun.js:15:38)
4 error     at manifest (/Users/zuse/.nvm/versions/node/v9.5.0/lib/node_modules/lerna/node_modules/pacote/lib/fetch.js:23:18)
4 error     at pinflight (/Users/zuse/.nvm/versions/node/v9.5.0/lib/node_modules/lerna/node_modules/pacote/manifest.js:24:12)
4 error     at /Users/zuse/.nvm/versions/node/v9.5.0/lib/node_modules/lerna/node_modules/promise-inflight/inflight.js:29:24
4 error     at Promise._execute (/Users/zuse/.nvm/versions/node/v9.5.0/lib/node_modules/lerna/node_modules/bluebird/js/release/debuggability.js:303:9)
4 error     at Promise._resolveFromExecutor (/Users/zuse/.nvm/versions/node/v9.5.0/lib/node_modules/lerna/node_modules/bluebird/js/release/promise.js:483:18)
4 error     at new Promise (/Users/zuse/.nvm/versions/node/v9.5.0/lib/node_modules/lerna/node_modules/bluebird/js/release/promise.js:79:10)
4 error     at _inflight (/Users/zuse/.nvm/versions/node/v9.5.0/lib/node_modules/lerna/node_modules/promise-inflight/inflight.js:28:25)
4 error     at /Users/zuse/.nvm/versions/node/v9.5.0/lib/node_modules/lerna/node_modules/promise-inflight/inflight.js:22:14
4 error     at tryCatcher (/Users/zuse/.nvm/versions/node/v9.5.0/lib/node_modules/lerna/node_modules/bluebird/js/release/util.js:16:23)

Context

Your Environment

bins:
/Users/zuse/.nvm/versions/node/v9.5.0/bin/lerna
/Users/zuse/.nvm/versions/node/v9.5.0/bin/npm
/usr/local/bin/yarn
/Users/zuse/.nvm/versions/node/v9.5.0/bin/node
Executable Version
lerna --version 3.1.2
npm --version 5.6.0
yarn --version 1.9.2
node --version v9.5.0
OS Version
macOS High Sierra 10.13.4 Beta (17E150g)
@evocateur
Copy link
Member

Hah, whoops, that's because lerna's --scope argument should be named --include, and it's conflicting with pacote's scope (in the npm sense) option. Sorry about that.

@evocateur evocateur added the bug label Aug 21, 2018
@evocateur evocateur self-assigned this Aug 21, 2018
@LeZuse
Copy link
Author

LeZuse commented Aug 22, 2018

@evocateur Thanks for the quick fix!

@lock
Copy link

lock bot commented Dec 27, 2018

This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Dec 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.