Using a private NPM package registry in the Frontend module.
Hey everyone,
We've been integrating some custom modules in our Frontend and started using GitLab Package Registries. It's got to the point where it's all working without a hitch locally, by providing the registry URL including token via .npmrc. But as soon as we try to deploy it to the Cloud Manager, the build fails stating that the Package cannot be found; see also below:
15:04:35,038 [Exec Stream Pumper] [INFO] npm ERR! code E404
15:04:35,039 [Exec Stream Pumper] [INFO] npm ERR! 404 Not Found - GET https://gitlab.org.de/api/v4/packages/npm/@org%2fpackage
15:04:35,039 [Exec Stream Pumper] [INFO] npm ERR! 404
15:04:35,039 [Exec Stream Pumper] [INFO] npm ERR! 404 '@org/package@1.0.4' is not in the npm registry.
15:04:35,039 [Exec Stream Pumper] [INFO] npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
15:04:35,039 [Exec Stream Pumper] [INFO] npm ERR! 404 It was specified as a dependency of 'ui.frontend'
15:04:35,039 [Exec Stream Pumper] [INFO] npm ERR! 404
15:04:35,039 [Exec Stream Pumper] [INFO] npm ERR! 404 Note that you can also install from a
15:04:35,040 [Exec Stream Pumper] [INFO] npm ERR! 404 tarball, folder, http url, or git url.
Does AEM automatically locate the .npmrc when it's placed under ui.frontend or do we have to set it up to load it by e.g. providing it via pom.xml? If so, how would we achieve that? Is this approach even possible and if not are there any alternatives?
Best regards.