- 09 Nov 2022
-
DarkLight
-
PDF
Dependencies for Adapter
- Updated on 09 Nov 2022
-
DarkLight
-
PDF
It is important to remember that adapters have dependencies. Most of the adapter code exists in its runtime libraries. This helps to provide new capabilities and allow those capabilities to be available to all adapters. These dependencies should be installed within the node_modules directory of the adapter. This requires that when you install an adapter, you run npm install within the adapter directory (not within IAP-Home or any directory above the adapter).
If you install dependencies above the adapter, it is possible that you will impact the adapter or other adapters and components of IAP as the versions of the dependencies may not be what the various components need.
Remember all of the adapter dependencies should exist within the node_modules directory within the adapter (adapter-home-dir/node_modules/dependencies). For example: IAP-Home/node_modules/@namespace/adapter-home-dir/node_modules/@itentialopensource/adapter-utils