akofman / cordova-plugin-add-swift-support

:hammer: Swiftify your Cordova app !
MIT License
117 stars 110 forks source link

Can not restore this plugin when using cordova-cli@8.0.0 #43

Closed NeoLSN closed 6 years ago

NeoLSN commented 6 years ago

The error message is below

(node:83295) UnhandledPromiseRejectionWarning: Error: Cannot find module '../cordova/platform_metadata'
    at Function.Module._resolveFilename (module.js:555:15)
    at Function.Module._load (module.js:482:25)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)
    at Context.requireCordovaModule (/Users/JasonYang/.nvm/versions/node/v9.3.0/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/Context.js:77:12)
    at exports.default (<project_root>/plugins/cordova-plugin-add-swift-support/add-swift-support.js:12733:34)
    at runScriptViaModuleLoader (/Users/JasonYang/.nvm/versions/node/v9.3.0/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:188:18)
    at runScript (/Users/JasonYang/.nvm/versions/node/v9.3.0/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:164:16)
    at /Users/JasonYang/.nvm/versions/node/v9.3.0/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:132:20
    at _fulfilled (/Users/JasonYang/.nvm/versions/node/v9.3.0/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:787:54)
(node:83295) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:83295) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with anon-zero exit code.

And the error happens on https://github.com/akofman/cordova-plugin-add-swift-support/blob/master/add-swift-support.js#L12733

akofman commented 6 years ago

Fixed with version 1.7.1.