Skip to content
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

Still having problem with requireCordovaModule #69

Open
JPAlfa opened this issue Nov 22, 2019 · 2 comments
Open

Still having problem with requireCordovaModule #69

JPAlfa opened this issue Nov 22, 2019 · 2 comments

Comments

@JPAlfa
Copy link

JPAlfa commented Nov 22, 2019

I'm still having problem with the requireCordovaModule. I was having problems with cordova prepare ios, because of the lines 172, 174 and 192 on the file src/add-swift-support.js.

It's caused by the context.requireCordovaModule. I changed to just require, and it worked. Am I missing something or this is still causing error? I can make a PR if necessary.

@JPAlfa
Copy link
Author

JPAlfa commented Nov 22, 2019

The bold parts are the errors:

if (semver.lt(context.opts.cordova.version, '5.4.0')) {
ConfigParser = context.requireCordovaModule('cordova-lib/src/ConfigParser/ConfigParser');
} else {
ConfigParser = context.requireCordovaModule('cordova-common/src/ConfigParser/ConfigParser');
}

return new ConfigParser(configPath);
};

const getBridgingHeaderPath = (projectPath, iosPlatformVersion) => {
let bridgingHeaderPath;
if (semver.lt(iosPlatformVersion, '4.0.0')) {
bridgingHeaderPath = path.posix.join(projectPath, 'Plugins', 'Bridging-Header.h');
} else {
bridgingHeaderPath = path.posix.join(projectPath, 'Bridging-Header.h');
}

return bridgingHeaderPath;
};

const getPlatformVersionsFromFileSystem = (context, projectRoot) => {
const cordovaUtil = context.requireCordovaModule('cordova-lib/src/cordova/util');

@JPAlfa
Copy link
Author

JPAlfa commented Nov 22, 2019

I'm using:

  • cordova 9
  • cordova-ios 5.0.1
  • cordova-android 8.1.0
  • cordova-plugin-add-swift-support 2.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant