-
Notifications
You must be signed in to change notification settings - Fork 107
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
mobile-spec project creation fails with error "Cannot find module 'cordova-common'" #159
Comments
How did you setup your Cordova folders with all the checkouts before running this command? |
@janpio I just checked out all the repos to a root folder using coho repo update. In the mobile-spec project, I did 'npm install cordova-common' |
Please install a new node version (to make sure there are not more global tools installed), create a new "Cordova" folder, use coho to check out all repositories there, then create a new mobile-spec project. Report each problem you encounter please and document all the commands you run. Thanks. |
@janpio Hi Jan, following are the detailed steps I tried:
On following these steps, i got the error - "Error: Module cordova-lib installed in cordova-plugman is not npm-linked. I recommend you run "coho npm-link". Even if i run coho npm-link from root folder or from cordova-plugman folder, this issue still exists. NOTE: I also get an error stating "Error: Cannot find module 'elementtree' when I run cordova -version command from root folder. Am i missing something in installation and setup? |
Steps 4-7 are not necessary, the first error you get also a problem of outdated instructions. Please check the updated READMEs at https://github.com/apache/cordova-mobile-spec and https://github.com/apache/cordova-mobile-spec/tree/master/createmobilespec. My PR got merged a few hours ago. |
|
Hi @janpio , I followed the exact steps as mentioned in the link - https://github.com/apache/cordova-mobile-spec/blob/master/createmobilespec/README.md#requirements-and-preparation While trying to execute the command - "node cordova-mobile-spec/createmobilespec/createmobilespec.js --android", I m still getting the same error as mentioned earlier. The complete error trace is as follows:
|
I recall having this issue when testing with master branch of cordova-android. For now can you try it on the 7.1.x branch? |
@brodybits Hi Chris, Thanks for the response. This was working for me couple of patches back. Could you please let me know the exact branch path and what needs to be updated to get it tested for a specific version? |
On Sun, Dec 2, 2018, 9:24 AM Gandhirajan ***@***.***> wrote:
@brodybits <https://github.com/brodybits> Hi Chris, Thanks for the
response. This was working for me couple of patches back.
I would suggest divide and can conquer to help pinpoint where it went wrong.
I would sometimes go back to where it was working and then move forward
20-30 % at a time to find the point of failure.
We want to test what we will release before releasing it.
… |
Thanks @gandhirajan, now that you have set it up following the new instructions, we have something we can compare. When I find the time, I will try to reproduce again. If what @brodybits says applies, switching |
@gandhirajan I can reproduce what you are getting for For Update: tried
|
And what @brodybits suggested with switching to That should give us some information to understand what is going wrong here. |
Investigation where the error is coming from:
This requires
So now I know why this is crashing: |
I now have 2 apps with the Android platform added, one with In 7.1.x this was copied there with this line: In This was added in apache/cordova-android#536 by @erisu with the comment:
I was using the CLI to add the platform ( |
Further discussion on how to solve the underlying CLI/Android problem is moved here: |
@janpio thanks for the info Jan. As you said, it works fine for browser platform. I guess we can close this once apache/cordova-cli#362 is sorted out. Please correct me if I m wrong |
Yep, apache/cordova-cli#362 and apache/cordova-cli#363 have to be fixed for this to work again. The second one is Windows only I think. |
mobile-spec project creation fails with the error "Error: Cannot find module 'cordova-common'" when trying to execute the command - "node ./cordova-mobile-spec/createmobilespec/createmobilespec.js --android --forceplugins"
If I try adding cordova-common module in mobile-spec project manually and try executing the platform add command using - "root_folder\cordova-cli\bin\cordova.cmd platform add "root_folder\cordova-android" --verbose" , platform addition is successfully.
Not sure how to bring in cordova-common module installed as dependency while creating mobile-spec project
The text was updated successfully, but these errors were encountered: