That is because you will need to install the library in the actual native build. The Make It Native 10 app comes with certain standard libraries but not the one you need. If you wish to make it work you will have to create a new Native build yourself.
Make sure you also create a native dependency file before starting the build process.
https://docs.mendix.com/apidocs-mxsdk/apidocs/pluggable-widgets-native-dependencies/
I think you might have missed some steps in the documentation that explains why you need a new build. Specifially this part: https://docs.mendix.com/howto/extensibility/create-native-javascript-action/#custom-developer-app