18c339a94Sopenharmony_ci# Conversion Tool 28c339a94Sopenharmony_ci 38c339a94Sopenharmony_ciTo make the migration to **node-addon-api** easier, we have provided a script to 48c339a94Sopenharmony_cihelp complete some tasks. 58c339a94Sopenharmony_ci 68c339a94Sopenharmony_ci## To use the conversion script: 78c339a94Sopenharmony_ci 88c339a94Sopenharmony_ci 1. Go to your module directory 98c339a94Sopenharmony_ci 108c339a94Sopenharmony_ci``` 118c339a94Sopenharmony_cicd [module_path] 128c339a94Sopenharmony_ci``` 138c339a94Sopenharmony_ci 148c339a94Sopenharmony_ci 2. Install node-addon-api module 158c339a94Sopenharmony_ci 168c339a94Sopenharmony_ci``` 178c339a94Sopenharmony_cinpm install node-addon-api 188c339a94Sopenharmony_ci``` 198c339a94Sopenharmony_ci 3. Run node-addon-api conversion script 208c339a94Sopenharmony_ci 218c339a94Sopenharmony_ci``` 228c339a94Sopenharmony_cinode ./node_modules/node-addon-api/tools/conversion.js ./ 238c339a94Sopenharmony_ci``` 248c339a94Sopenharmony_ci 258c339a94Sopenharmony_ci 4. While this script makes conversion easier, it still cannot fully convert 268c339a94Sopenharmony_cithe module. The next step is to try to build the module and complete the 278c339a94Sopenharmony_ciremaining conversions necessary to allow it to compile and pass all of the 288c339a94Sopenharmony_cimodule's tests.