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 Answer
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 ENGINEER
answered 8 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions