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 個回答
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
支援工程師
已回答 8 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南