Cordoba 8 + iOS 4.5.4 = cannot find the module "../cordova/platform_metadata"

Since the last upgrade to v8 from Cordoba, I can’t create anything on the Mac. I always get

(node 626) UnhandledPromiseRejectionWarning: Error: Cannot find module '../cordova/platform_metadata'

I tried what was suggested in this , but I get the same error.

Then I made a verbose version, and it looks like the plugin needed for the build for ios does not work well.

Executing script found in plugin cordova-plugin-swift-support for hook "after_prepare": plugins/cordova-plugin-swift-support/src/add-swift-support.js
Resolving module name for cordova-lib/src/cordova/platform_metadata => ../cordova/platform_metadata
(node:599) UnhandledPromiseRejectionWarning: Unhandled promise rejection 
(rejection id: 1): Error: Cannot find module '../cordova/platform_metadata'
(node:599) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.
+4
source share
5 answers

It was a bug in cordova-plugin-add-swift-support, just update it to the latest version (1.7.1)

cordova plugin rm cordova-plugin-add-swift-support
cordova plugin add cordova-plugin-add-swift-support
+11
source

you need to downgrade cordova 7.1.0 until this problem is fixed. Do it:

 npm uninstall -g cordova
 npm install -g cordova@7.1.0

 cordova platform remove ios
 cordova platform add ios
+7
source

( ). Ionic node_module, cordova/platform_metadata, .

Linux, :

grep -iRn 'platform_metadata'

cordova-plugin-add-swift-support, , , . . , , , , .

+1

, 7.1.0 .

0

If you need a quick plugin to start an ion project, you need to add the -force flag:

ionic cordova plugin rm cordova-plugin-add-swift-support --force

Then run:

ionic cordova plugin add cordova-plugin-add-swift-support
0
source

Source: https://habr.com/ru/post/1691714/


All Articles