Coder Social home page Coder Social logo

Comments (15)

janpio avatar janpio commented on September 1, 2024 2

(Which reminds me we should just make sure that a .gitignore is generated for new projects: apache/cordova-app-hello-world#30)

from cordova-browser.

brodybits avatar brodybits commented on September 1, 2024 1

I just raised apache/cordova-cli#366 with a proposal to release the solution in apache/cordova-cli#335 in a patch release. Too bad we missed it when we made the cordova-cli patch release last October.

I cannot promise when I or anyone else will have a chance to make the new cordova-cli release.

from cordova-browser.

brodybits avatar brodybits commented on September 1, 2024 1

If someone would do cordova requirements on a project with multiple platforms including browser and iOS, it would stop with the error message on browser and miss iOS. I would classify this as a UX issue in general, too bad we missed apache/cordova-cli#335 when we made the patch release in October.

from cordova-browser.

erisu avatar erisu commented on September 1, 2024 1

This issue has been resolved in #61 and in [email protected].

from cordova-browser.

pashog avatar pashog commented on September 1, 2024 1

@janpio tried from master and it prints:

Cannot read property 'version' of undefined
TypeError: Cannot read property 'version' of undefined
    at /usr/local/lib/node_modules/cordova/src/cli.js:391:83
    at Array.forEach (<anonymous>)
    at /usr/local/lib/node_modules/cordova/src/cli.js:388:39
    at Array.map (<anonymous>)
    at /usr/local/lib/node_modules/cordova/src/cli.js:375:68
    at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:854:54)
    at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:883:30
    at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:816:13)
    at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:624:44
    at runSingle (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:137:13)

But it looks like master is behind 8.1.2 (older than npm repository one)

Have the same error with 9.0.0 ([email protected]).
In my case, an error appeared after removing all the platforms and adding an old [email protected]

from cordova-browser.

janpio avatar janpio commented on September 1, 2024

What CLI version are you using? Can you maybe install the CLI from master or nightly and try with this version? I recall there were lots of fixes to the requirements functionality in there.

(In general: The browser platform has no real requirements.)

from cordova-browser.

danielgomezrico avatar danielgomezrico commented on September 1, 2024

@janpio Im using cli 8.1.2 ([email protected]) but it happens with 7.1.0 too, I will try that 👍

from cordova-browser.

danielgomezrico avatar danielgomezrico commented on September 1, 2024

@janpio tried from master and it prints:

Cannot read property 'version' of undefined
TypeError: Cannot read property 'version' of undefined
    at /usr/local/lib/node_modules/cordova/src/cli.js:391:83
    at Array.forEach (<anonymous>)
    at /usr/local/lib/node_modules/cordova/src/cli.js:388:39
    at Array.map (<anonymous>)
    at /usr/local/lib/node_modules/cordova/src/cli.js:375:68
    at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:854:54)
    at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:883:30
    at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:816:13)
    at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:624:44
    at runSingle (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:137:13)

But it looks like master is behind 8.1.2 (older than npm repository one)

from cordova-browser.

janpio avatar janpio commented on September 1, 2024

8.1.2 fixed some stuff that was messed up in 8.1.1 - but I checked and master is indeed identical to 8.1.1/2 - so my advice was just bad.

So yep, bug in here or in the CLI that someone has to debug and fix.

from cordova-browser.

danielgomezrico avatar danielgomezrico commented on September 1, 2024

@janpio here's an example https://github.com/caipivara/test-cordova-browser-failure

You can run:

cordova requirements

Just there to see the error happening

from cordova-browser.

brodybits avatar brodybits commented on September 1, 2024

https://github.com/caipivara/test-cordova-browser-failure

I see the bug with Cordova CLI 8.1.2.

If I try with cordova@nightly (nightly build from master branch of cordova-cli) I see the following:

this.isCordova is not a function
TypeError: this.isCordova is not a function
    at preProcessOptions (/Users/brodybits/.nvs/node/11.2.0/x64/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/util.js:292:28)
    at Promise.resolve.then (/Users/brodybits/.nvs/node/11.2.0/x64/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/requirements.js:36:37)
    at process._tickCallback (internal/process/next_tick.js:43:7)
    at Function.Module.runMain (internal/modules/cjs/loader.js:778:11)
    at startup (internal/bootstrap/node.js:300:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:826:3)

(I use https://github.com/jasongin/nvs to switch between Node.js versions, with cordova@nightly installed with Node.js 11.)

@caipivara I highly recommend you do not commit node_modules, plugins, or platforms unless absolutely necessary. Each developer on a Cordova project can regenerate using cordova prepare.

Thanks for reporting.

from cordova-browser.

danielgomezrico avatar danielgomezrico commented on September 1, 2024

@caipivara I highly recommend you do not commit node_modules, plugins, or platforms unless absolutely necessary. Each developer on a Cordova project can regenerate using cordova prepare.

👍 got it thanks

from cordova-browser.

brodybits avatar brodybits commented on September 1, 2024

If I would do npm install in my checkout of cordova-cli master branch it seems to work for me. It seems to be already fixed in apache/cordova-cli@f10a371 (references https://issues.apache.org/jira/browse/CB-13740), so we should be able to port it to 8.1.x.

I would also like to see a unit test that verifies that this issue does not reappear in the future.

from cordova-browser.

janpio avatar janpio commented on September 1, 2024

I repeat:

(In general: The browser platform has no real requirements.)

So this really is not a pressing concern.

from cordova-browser.

XinYaanZyoy avatar XinYaanZyoy commented on September 1, 2024

this error comes only if we've added browser to platforms!!
all other objects(androind, ios, windows etc.) of platforms are working properly!!

i think the source code should be edited in next version of cordova, to ignore this "message"

because as @janpio said there is no "actual" requirements for browser platform since our code itself is written in brower-native languages like html-css-js!!

from cordova-browser.

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.