(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.
The error message is below
And the error happens on https://github.com/akofman/cordova-plugin-add-swift-support/blob/master/add-swift-support.js#L12733