Installed package "is not in the npm registry"

I’m having trouble building a release build with Appflow. The problem is an NPM package from a 3rd party vendor, which is “not found” when building on Appflow even though installing it locally works normally.

The Appflow build process fails with the following error:

Discovered plugin “cordova-plugin-datalogic”. Adding it to the project
Failed to restore plugin “cordova-plugin-datalogic”. You might need to try adding it again. Error: Error: Command failed with exit code 1: npm view cordova-plugin-datalogic --json
npm ERR! code E404
npm ERR! 404 Unpublished by codybrookshear on 2018-11-29T21:06:36.354Z
npm ERR! 404
npm ERR! 404 ‘cordova-plugin-datalogic’ is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-01-20T16_59_01_405Z-debug.log
{
“error”: {
“code”: “E404”,
“summary”: “Unpublished by codybrookshear on 2018-11-29T21:06:36.354Z”,
“detail”: “\n ‘cordova-plugin-datalogic’ is not in the npm registry.\nYou should bug the author to publish it (or use the name yourself!)\n\nNote that you can also install from a\ntarball, folder, http url, or git url.”
}
}

The package is here, and I just re-installed it on a local development machine, so the package definitely DOES exist:

The cordova cli version is my best guess. Cordova didn’t roll out support for scoped packages until v10. All Appflow build stacks include a cordova cli (v10 or the ionic v9.0.3 fork) that supports scoped packages but it’s possible to override it if you have the cordova cli as a project dependency. This could also be a side effect of installation using an older version of the cordova cli.

If you email support@ionic.io and give them the Appflow app id they can look at your build logs and see what’s going on.

1 Like

Thanks. The stack includes Cordova CLI 10.0.0 and Ionic CLI 6.12.1. I emailed the support. Let’s see what they say!