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.

Latest update broke cordova

See original GitHub issue

Describe the bug I know this might not directly your fault or problem, but I wanted to notify you that the last update to your npm package broke apache/cordova-cli (and probably other packages depending on this one), because of these additions:

https://github.com/sebhildebrandt/systeminformation/blob/bd5b8abab6545706b7edfbb675a77fa51a07e907/lib/index.js#L24-L25

You probably shouldn’t do this, as you share the object prototype with everyone in a project and people might be setting methods with used names on their objects. In cordova’s case they depend on https://github.com/kriskowal/q which sets a method valueOf on their objects, overriding the prototype.

To Reproduce

  1. npm i -g cordova
  2. cordova create test
  3. cd test
  4. cordova platform add android

Current Output

TypeError: Cannot assign to read only property 'valueOf' of object '[object Object]'
    at Function.defer (/home/<snip>/.local/share/npm/lib/node_modules/cordova/node_modules/q/q.js:577:21)
    at Object.exports.spawn (/home/<snip>/.local/share/npm/lib/node_modules/cordova/node_modules/cordova-common/src/superspawn.js:64:17)
    at /home/<snip>/.local/share/npm/lib/node_modules/cordova/node_modules/cordova-fetch/index.js:177:31

Expected behavior Successfully executes command

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
sebhildebrandtcommented, Nov 25, 2020

@RianFuro … exactly, that was my feeling. So I now reverted this, Version 4.30.4 just published. Will need to have a look, what possibility I have to manage this.

0reactions
sebhildebrandtcommented, Nov 25, 2020

@raphinesse you are always welcome… really sorry about the inconvenience …

Read more comments on GitHub >

github_iconTop Results From Across the Web

Blog - Apache Cordova
Cordova CLI 11.0.​​ We are happy to announce that we have just released a major update to our Cordova CLI! In this CLI...
Read more >
Cordova Android build broken after gradle dependencies ...
Cordova Android build broken after gradle dependencies update: Execution failed for task ':processDebugResources'.
Read more >
cordova-android/RELEASENOTES.md at master - GitHub
Release Notes for Cordova (Android). 11.0.0 (Jul 04, 2022). Breaking: GH-1441 feat!: Android 12 splash screen; GH-1427 feat!: API 32 support; GH-1410 feat!:...
Read more >
Cordova has been broken since RC and still is in release
Create a new cordova project Hit "Simulate in Browser" VS fails with the error ... If this is still an issue for you,...
Read more >
How to update Cordova CLI, Platforms and Plugins - ionic.zone
Run cordova -v again after the update to make sure the update worked and it now returns the current version. Update Cordova Platforms....
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