ConnectSDK / Connect-SDK-Cordova-Plugin

Cordova/PhoneGap plugin for Connect SDK
Apache License 2.0
67 stars 46 forks source link

Fixes Android install errors (eg. Cannot find module internal/util/types) #79

Open Lindsay-Needs-Sleep opened 4 years ago

Lindsay-Needs-Sleep commented 4 years ago

node_modules should not be committed. Instead add them as a dependency. This fixes #77 Fixes "Error: Cannot find module internal/util/types" and Fixes "Failed to install 'cordova-plugin-connectsdk': Error: Cannot find module 'setimmediate'"

Lindsay-Needs-Sleep commented 4 years ago

Basically, the required node_modules were committed to the repo and were not dynamically retrieved by npm before install. So removing the hard-coded node_modules and adding them to the dependencies seems to have worked. (I'm thinking the hard-coded node_modules worked with a specific version of Cordova which included the node_modules' dependencies as part of the platform but have since been removed or changed.)

Lindsay-Needs-Sleep commented 4 years ago

I believe this will also fix #62