Issue on using imported npm package from AWS Code Artifact

0

I have created a npm package in AWS code Artifact. Then I have import it in another project using AWS CLI and with proper AWS Configurations. And I can able to see the imported library in project's package.json and the node_modules folder. Now the problem is when I try to import the library using "import" command, I am facing "Module not found Error" . If anyone have hand on experience in npm package implementation and using packages from AWS CodeArtifact please assist me on in this issue.

1 Antwort
0

The recommend methods to use Using CodeArtifact with npm is mentioned in this reference link :

[1] Using CodeArtifact with npm - https://docs.aws.amazon.com/codeartifact/latest/ug/using-npm.html

This error[cannot find module] generally occurs because you’re trying to import an item from a module you don’t have installed in your project directory

To resolve the issue you need to install the package that is absent in your project directory – npm install package-name or yarn add package-name. using the methods mentioned in the above mentioned reference link [1].

AWS
SUPPORT-TECHNIKER
beantwortet vor 8 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen