Giter Site home page Giter Site logo

Comments (7)

erisu avatar erisu commented on September 27, 2024 7

macos-release version 2.5.0 is required.

We do not pin exact direct dependent packages and some of these sub packages are not pinned too. Just reinstall Cordova CLI so it will fetch [email protected]

npm uninstall -g cordova
npm install -g cordova

$ npm ls macos-release
[email protected] /Users/cdv/n/lib/node_modules/cordova
└─┬ [email protected]
  └─┬ [email protected]
    └── [email protected]

from cordova-cli.

breautek avatar breautek commented on September 27, 2024 1

This is happening again with Ventura ... we need a future proof fix

Probably just get rid of insight package. We use it to display the "consumer" name of the Mac version instead of the Darwin version.

But unfortunately the underlying package can't see in the future nor do they gracefully handle unknown Darwin versions. Instead we can just use the NodeJS APIs (OS.platform() / OS.release() / OS.version()). Platform will provide darwin on macs, and either release() or version() will provide the version. OS.version() might be pretty much a direct replacement since it returns "Windows 10 Pro" rather than the actual OS version. (release() appears to return the actual version, e.g: 10.0.19045

Someone with a mac can confirm, but this is probably a better path forward and we get to manage one less dependency.

from cordova-cli.

arturvt avatar arturvt commented on September 27, 2024

I forked and updated the required libs to make it work. I can send a PR if it's allowed.
The issue is with "os-name" lib. It should be updated to "^5.0.0".

I updated the libs related below, but it didn't update the lib we want, so I added as dependency into main package.json and it worked.

Here's the solution for unblocking you:

  1. Clone the cli project2
  2. Update those libs:
  • "cordova-lib": "^10.1.0",
  • "insight": "^0.11.1",
  • "systeminformation": "^5.9.9",
  • "os-name": "^5.0.0",
  1. run npm link cordova

from cordova-cli.

eun-choi avatar eun-choi commented on September 27, 2024

Before re-install:

[email protected] /usr/local/lib/node_modules/cordova
└─┬ [email protected]
  └─┬ [email protected]
    └── [email protected] 

> cordova build ios
/usr/local/lib/node_modules/cordova/node_modules/macos-release/index.js:27
const [name, version] = nameMap.get(release);

TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))

After re-install:

[email protected] /usr/local/lib/node_modules/cordova
└─┬ [email protected]
  └─┬ [email protected]
    └── [email protected] 

This problem was solved by reinstalling.
However, if you upgrade macOS 12 with it already cordova 10 installed,
I suspect others will have the same problem.
Because, it's been over a year since the cordova 10.0.0 version was released.

https://github.com/apache/cordova-cli/blob/master/package-lock.json
3860 lines:

    "macos-release": {
      "version": "2.4.1",
      "resolved": "https://registry.npmjs.org/macos-release/-/macos-release-2.4.1.tgz",
      "integrity": "sha512-H/QHeBIN1fIGJX517pvK8IEK53yQOW7YcEI55oYtgjDdoCQQz7eJS94qt5kNrscReEyuD/JcdFCm2XBEcGOITg=="
    },

I know that dependencies are pinned to insight 0.10.3.
If you update the insight dependency to version 0.11.1,
I think there should be no problem.

https://github.com/apache/cordova-cli/blob/master/package.json
32 lines:

    "insight": "^0.10.3",

from cordova-cli.

theblang avatar theblang commented on September 27, 2024

For posterity, here's the issue from the dependency repository.

from cordova-cli.

purplecabbage avatar purplecabbage commented on September 27, 2024

This is happening again with Ventura ... we need a future proof fix

from cordova-cli.

rajohns08 avatar rajohns08 commented on September 27, 2024

Yeah looks like the insight package is basically throwing in the towel on this issue, and the creator removed it from his own product: yeoman/insight#83. So that is likely the best path forward for cordova as well.

from cordova-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.