nordnet / cordova-universal-links-plugin

[DEPRECATED] - Cordova plugin to support Universal/Deep Links for iOS/Android.
https://github.com/nordnet/cordova-universal-links-plugin/issues/160
MIT License
349 stars 529 forks source link

[1.1.2] Error during installation #63

Closed markshust closed 5 years ago

markshust commented 8 years ago

I'm receiving the following error when trying to install with Meteor 1.3. This happens at build-time when trying to run on ios-device:


=> Started proxy.                             
=> Started MongoDB.                           
Installing dependency packages:              [====================       ] 75% 6.5s
{
  "mkpath": ">=1.0.0",
  "xml2js": ">=0.4",
  "rimraf": ">=2.4",
  "node-version-compare": ">=1.0.1",
  "plist": ">=1.2.0"
}
% Failed to install 'cordova-universal-links-plugin':TypeError: undefined is not a function
    at module.exports (/Users/markshust/Sites/foo/.meteor/local/cordova-build/plugins/cordova-universal-links-plugin/hooks/beforePluginInstallHook.js:49:16)
    at runScriptViaModuleLoader (/Users/markshust/.meteor/packages/meteor-tool/.1.3.2_4.1o34fbp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova-lib/src/hooks/HooksRunner.js:167:18)
    at runScript (/Users/markshust/.meteor/packages/meteor-tool/.1.3.2_4.1o34fbp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova-lib/src/hooks/HooksRunner.js:145:16)
    at /Users/markshust/.meteor/packages/meteor-tool/.1.3.2_4.1o34fbp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova-lib/src/hooks/HooksRunner.js:130:20
    at _fulfilled (/Users/markshust/.meteor/packages/meteor-tool/.1.3.2_4.1o34fbp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/q/q.js:787:54)
    at self.promiseDispatch.done (/Users/markshust/.meteor/packages/meteor-tool/.1.3.2_4.1o34fbp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/q/q.js:816:30)
    at Promise.promise.promiseDispatch (/Users/markshust/.meteor/packages/meteor-tool/.1.3.2_4.1o34fbp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/q/q.js:749:13)
    at /Users/markshust/.meteor/packages/meteor-tool/.1.3.2_4.1o34fbp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/q/q.js:810:14
    at flush (/Users/markshust/.meteor/packages/meteor-tool/.1.3.2_4.1o34fbp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/q/q.js:108:17)
    at process._tickCallback (node.js:458:13)
=> Errors executing Cordova commands:                                              

   While adding plugin cordova-universal-links-plugin@1.1.2 to Cordova project:    
   TypeError: undefined is not a function                                          
   at module.exports
   (/Users/markshust/Sites/foo/.meteor/local/cordova-build/plugins/cordova-universal-links-plugin/hooks/beforePluginInstallHook.js:49:16)
   at runScriptViaModuleLoader
   (/Users/markshust/.meteor/packages/meteor-tool/.1.3.2_4.1o34fbp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova-lib/src/hooks/HooksRunner.js:167:18)
   at runScript
   (/Users/markshust/.meteor/packages/meteor-tool/.1.3.2_4.1o34fbp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova-lib/src/hooks/HooksRunner.js:145:16)
   at
   /Users/markshust/.meteor/packages/meteor-tool/.1.3.2_4.1o34fbp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova-lib/src/hooks/HooksRunner.js:130:20
   at _fulfilled
   (/Users/markshust/.meteor/packages/meteor-tool/.1.3.2_4.1o34fbp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/q/q.js:787:54)
   at self.promiseDispatch.done
   (/Users/markshust/.meteor/packages/meteor-tool/.1.3.2_4.1o34fbp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/q/q.js:816:30)
   at Promise.promise.promiseDispatch
   (/Users/markshust/.meteor/packages/meteor-tool/.1.3.2_4.1o34fbp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/q/q.js:749:13)
   at
   /Users/markshust/.meteor/packages/meteor-tool/.1.3.2_4.1o34fbp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/q/q.js:810:14
   at flush
   (/Users/markshust/.meteor/packages/meteor-tool/.1.3.2_4.1o34fbp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/q/q.js:108:17)
   at process._tickCallback (node.js:458:13)

/Users/markshust/.meteor/packages/meteor-tool/.1.3.2_4.1o34fbp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/isopackets/cordova-support/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:116
      throw error;
            ^
ExitWithCode:1
nikDemyankov commented 8 years ago

What version of node you are using? According to error message:

% Failed to install 'cordova-universal-links-plugin':TypeError: undefined is not a function
    at module.exports (/Users/markshust/Sites/foo/.meteor/local/cordova-build/plugins/cordova-universal-links-plugin/hooks/beforePluginInstallHook.js:49:16)

It can't find spawnSync method.

markshust commented 8 years ago

meteor uses node 0.10

nikDemyankov commented 8 years ago

Never used it, so will ask: it can't work with node 4+?

If not - then you can do the following:

  1. Fork this repo.
  2. Go to plugin.xml and remove line 28:

    <hook src="hooks/beforePluginInstallHook.js" type="before_plugin_install" />
  3. In your application remove ios and android platforms from the project:

    cordova platform remove ios android
  4. Add plugin with git link:

    cordova plugin add https://github.com/markoshust/cordova-universal-links-plugin.git
  5. Install plugin dependencies:

    cd YOUR_PROJECT/plugins/cordova-universal-links-plugin
    npm i
  6. Now you can add platforms to the project:

    cordova platform add ios android

So, the task is to install plugin dependencies before adding plugin to the platforms.

nordnet-deprecation-bot commented 5 years ago

👋 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.