question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot delete property '--' of #<Object> for lerna 3.18.4

See original GitHub issue

I exec lerna exec -- npm view \$LERNA_PACKAGE_NAME, then an error appears:

$ lerna -v
3.18.4
$ lerna exec -- npm view \$LERNA_PACKAGE_NAME
/<proj>/node_modules/yargs/yargs.js:1184
      else throw err
           ^

TypeError: Cannot delete property '--' of #<Object>
    at Object.Yargs.self._copyDoubleDash (/<proj>/node_modules/yargs/yargs.js:1196:5)
    at Object.parseArgs [as _parseArgs] (/<proj>/node_modules/yargs/yargs.js:1097:60)
    at Object.parse (/<proj>/node_modules/yargs/yargs.js:578:25)
    at main (/<proj>/node_modules/lerna/index.js:44:6)
    at Object.<anonymous> (/<proj>/node_modules/lerna/cli.js:11:15)
    at Module._compile (internal/modules/cjs/loader.js:956:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
    at Module.load (internal/modules/cjs/loader.js:812:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
    at Module.require (internal/modules/cjs/loader.js:849:19)

Expected Behavior

No error

Current Behavior

The error

Possible Solution

Maybe from yargs 14.2.1

Steps to Reproduce (for bugs)

  1. create an empty respository
  2. yarn init
  3. yarn global add lerna
  4. lerna exec – npm view $LERNA_PACKAGE_NAME
lerna.json

<!-- Please paste your `lerna.json` here -->
no lerna.json

lerna-debug.log

<!-- If you have a `lerna-debug.log` available, please paste it here -->
<!-- Otherwise, feel free to delete this <details> block -->
no lerna-debug.log

Context

Your Environment

Executable Version
lerna --version 3.18.4
npm --version 6.11.3
yarn --version 1.12.1
node --version v12.12.0
OS Version
MacOS Mojave 10.14.6

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:20
  • Comments:16 (2 by maintainers)

github_iconTop GitHub Comments

8reactions
joeycozzacommented, Nov 18, 2019

@samarpanB I tried downgrading lerna in my package.json to 3.17.0 , and it DID work for me. This is what that line looks like.

    "lerna": "3.17.0",
5reactions
Salakarcommented, Nov 19, 2019

Ditto,

Downgrading to the following works for me for now:

"lerna": "3.17.0",
Read more comments on GitHub >

github_iconTop Results From Across the Web

Javascript delete object property not working - Stack Overflow
If the object inherits a property from a prototype, and doesn't have the property itself, the property can't be deleted by referencing the...
Read more >
TypeError: property "x" is non-configurable and can't be deleted
It was attempted to delete a property, but that property is non-configurable. The configurable attribute controls whether the property can be deleted from...
Read more >
Unable to delete JS object property - Salesforce Developers
Hey, I'm trying to delete property on one of my objects, but I"m seein this error: Cannot delete property 'Field Name' of #<Object>...
Read more >
Locker Service preventing delete of object properties
I'm experiencing Cannot delete property 'Owner' of [object Object] issue too from yesterday. – Praveen. Mar 11, 2017 at 5:12.
Read more >
The Secret of the 'delete operator' - Better Programming
Non-configurable properties cannot be removed. const object = {};Reflect.defineProperty(object, 'name', ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found