We are building an npm package and we are trying to test it on a server. We have built a minimal cra app that requires our package. For some reason, the app works on localhost but fails on a Netlify server.
My question is: How can we test the npm package? We could redeploy the npm package and try again but that is obviously undesirable. We want to test locally without republishing the npm package.
I have tried to use “npm link” but that does did not work because the project is rebuilt with the package on npm. When I installed the package from a file I got the warning
5:52:51 PM: error Package "bitcoin-computer" refers to a non-existing file '"/opt/build/bitcoin-computer"'.
What is the recommended way to test an NPM package on Netlify locally? Many Thanks!