Skip to content
This repository has been archived by the owner on Oct 1, 2018. It is now read-only.

Error: Cannot find module '../lang/isNative' #4

Closed
schoettler opened this issue Sep 30, 2015 · 8 comments
Closed

Error: Cannot find module '../lang/isNative' #4

schoettler opened this issue Sep 30, 2015 · 8 comments

Comments

@schoettler
Copy link

First of all, nice work with the plugin;

I just added the plugin via the stable repository

cordova plugin add cordova-universal-links-plugin

But as i run a build on android, i get this error:

<project>/hooks/after_prepare/010_add_platform_class.js 

add to body class: platform-android
ERROR running one or more of the platforms: Error: Cannot find module '../lang/isNative'
You may not have the required environment or OS to run this project

What am i missing?

@nikDemyankov
Copy link
Member

Thanks :)

Just checked it like so:

  1. Created new project and added plugin to it:

    cordova create TestUL com.example.ul TestUL
    cd ./TestUL
    cordova platform add android
    cordova plugin add cordova-universal-links-plugin
  2. Added preference to config.xml:

    <universal-links>
      <host name="example.com" />
    </universal-links>
  3. Build the project:

    cordova build android

And it builds fine.

Are you adding UL plugin to some existing project? Maybe it somehow conflicts with other plugins: which are you using?

@schoettler
Copy link
Author

'com.ionic.keyboard',
'cordova-plugin-device',
'https://github.com/phonegap-build/PushPlugin.git',
'https://github.com/schoettler/cordova-cookie-master.git',
'cordova-plugin-inappbrowser',
'cordova-plugin-network-information',
'cordova-plugin-whitelist',
'cordova-plugin-file',
'cordova-plugin-media',
'uk.co.whiteoctober.cordova.appversion'

EDIT: Just tested with all these plugins, and i cannot replicate the issue, will keep you posted!

@schoettler
Copy link
Author

This is the 010_add_platform_class.js for reference: http://pastebin.com/Tk9wASQk

@nikDemyankov
Copy link
Member

Sooo, as I understand, everything is now works? :)

@schoettler
Copy link
Author

Not yet, but i have found a more complete error message:

cordova build android
Running command: <project>/hooks/after_prepare/010_add_platform_class.js 

add to body class: platform-android
Error: Cannot find module '../lang/isNative'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (<project>/node_modules/xml2js/node_modules/xmlbuilder/node_modules/lodash/internal/getNative.js:1:78)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)

@schoettler
Copy link
Author

My closest guess is a node dependency conflict, my package.json looked a little like this

Deleted node_modules and reinstalled without gulp and it worked.

@nikDemyankov
Copy link
Member

Thanks for the tip! I'll look into that as soon as possible.

@nordnet-deprecation-bot
Copy link
Contributor

👋 Hi! Thank you for your interest in this repo.

😢 We are not using nordnet/cordova-universal-links-plugin anymore, and we lack the manpower and the experience needed to maintain it. We are aware of the inconveniece that this may cause you. Feel free to use it as is, or create your own fork.

🔒 This will now be closed & locked.

ℹ️ Please see #160 for more information.

@nordnet nordnet locked and limited conversation to collaborators Sep 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants