Having trouble with adding npm packages to my repository in AWS CodeArtifact

My main goal in utilizing CodeArtifact for my project was to effectively manage third-party npm and pypi dependencies. However, I encountered unexpected issues while attempting to work with npm.

To address this, I set up a domain and a primary repository named "MainRepo" within CodeArtifact, incorporating two upstream stores: npm ("npm-store") and pypi ("pypi-store"). Following this, I established a local folder on my PC and configured the connection to "MainRepo" using AWS CLI, specifying npm as the tool. After confirming that npm was successfully pointing to my repository by running:

npm -d ping

I proceeded to install husky and commitlint:

npm install husky --save-dev
npm install @commitlint/cli --save-dev

At this stage, I expected to see these packages (along with their dependencies) reflected in my main repository or at least in the npm-store. To my surprise, none of them appeared. Despite several attempts wherein I installed various other packages, none were included in CodeArtifact.

As a last resort, I attempted to install aws-cdk globally using:

npm install -g aws-cdk

This installation was successful and displayed in my repository within the CodeArtifact console.

I am puzzled as to why the previously mentioned packages were overlooked by CodeArtifact. Any insights into this issue would be greatly appreciated.

Answer №1

Encountering a similar issue, I found myself dealing with an existing project that already had a package-lock.json. This particular file contains a resolved field for each dependency, which means the installer will continue to look up in those registries even if you've changed your main registry on your computer.

To solve this, I decided to remove the existing package-lock.json so it could be recreated with the correct registry pointing to CodeArtifact. After reinstalling my packages, everything showed up correctly in my repository.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is the purpose of creating a package-lock.json file when npm already has the npm-shrinkwrap.json for locking dependencies?

npm-shrinkwrap.json: Securing the node_modules tree and its dependencies and sub-dependencies to ensure the package remains stable across different machines. package-lock.json: Safeguarding the node_modules tree along with its dependencies and nested depe ...

Encountering an issue with NextJS 13 when utilizing the vectorstore recommended by Langchain, specifically receiving an error message stating that HNSWLib

Currently, I am building an application utilizing Langchain and OpenAI for assistance. My approach involves loading data using JSONLoader and intending to save it in a vectorstore. This way, I can provide specific answers to user queries based on the store ...

Issues with installing npm in Docker

I have encountered an issue with my Docker file while transitioning from using Node 10 to Node 16. Previously, my Dockerfile looked like this (with environment variables removed for privacy): FROM node:10-alpine RUN mkdir -p /home/node/app/node_modules &a ...

Arrangement of code: Utilizing a Node server and React project with a common set of

Query I am managing: a simple react client, and a node server that functions as both the client pages provider and an API for the client. These projects are tightly integrated, separate TypeScript ventures encompassed by a unified git repository. The se ...

enigmatic issue arising in Angular/Node

Could someone please shed some light on what might be causing the issue in my code? Thank you in advance! webpack: Compilation Failed. My Angular CLI: 1.6.3 Node: 8.9.4 OS: Windows 32-bit Angular: 5.2.1 Error Message: ERROR in ./node_modules/css-loader ...

Encountering a problem with npm private modules

I have a few private modules that are not available on the npm site, and I want to use them in my application. However, I am encountering some issues when trying to upload them to Elasticbeanstalk (Elastic Beanstalk runs npm install after each upload). ...

My date function in Node JS is throwing an error, can someone please help me troubleshoot?

I encountered an error with new date(); while working with node js and express npm plugin. I built a variable date but faced some compilation errors. This is my code .js var update_time = new Date(); update_time.formatDate("y/m/d"); When I run ...

Encountering a 403 error while trying to download dependencies from Artifactory via Npm

Currently in the process of executing a task within a Node.js project. One of the tasks involves using the rtnpminstall command, which in turn executes the npm install command. The execution of the rtnpminstall command is triggered by the Artifactory plugi ...

Steps for initiating an Angular 4 project

While most developers have moved on to Angular 5, I was tasked with creating a project using Angular 4. After conducting research for several days, I discovered that downgrading the Angular CLI would allow me to accomplish this. By following this approach, ...

Using jquery-url in a nodejs environment

I am currently attempting to migrate a piece of JavaScript code that relies on jquery-url from jQuery to Node.js. The specific function in question uses jquery-url to extract the hostname from a given URL, like so: var host = $.url(url).attr('host&a ...

Having trouble with installing an npm package into your system?

I attempted multiple methods to install this package: npm install cloud-print npm install https://github.com/postmen/node-cloud-print.git and so forth... However, each time I encountered the following output: `npm WARN addRemoteGit Error: Command fai ...

Every time I try to install create-react-app, I keep encountering a frustrating 'network Socket timeout' error

$ npx create-react-app amazon-clone npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead. Creating a new React app in D:\js\faceboom. npm WARN config global `--global`, `--local` are deprecated. ...

"Encountered the error message "Self-signed certificate in certificate chain" while attempting to run the command 'node-gyp configure'

Encountered an error while attempting to build the Microsoft driver for Node.js for SQL Server gyp info it worked if it ends with ok gyp info using [email protected] gyp info using [email protected] | win32 | x64 gyp http GET https://nodejs ...

JSON-Schema: Value-based conditional dependency

Here is a simplified version of the JSON-Schema: { "$schema": "http://json-schema.org/draft-04/schema#", "id": "user", "type": "object", "properties": { "account": { "type": "object", "properties": { ...

What steps should I take to resolve a plugin error specifically related to index.js while using Cypress?

I am encountering an error in Cypress A plugin has thrown the following error, causing our tests to stop running due to a plugin crash. Please verify your plugins file (/home/dev2/Desktop/kavitaSeffcon/CypressProject/cypress/plugins/index.js) Error: ENOE ...

Setting the backEnd URL in a frontEnd React application: Best practices for integration

Hey there - I'm new to react and front-end development in general. I recently created a RESTful API using Java, and now I'm wondering what the best way is to specify the backend URL for the fetch() function within a .jsx file in react. Currently, ...

Error in TypeScript React: "Could not locate module: Unable to locate 'styled-components'"

Even though I have installed the @types/styled-components package and compiled my Typescript React app, I am consistently encountering this error: Module not found: Can't resolve 'styled-components' I have double-checked that 'style ...

Can anyone explain the functionality of passport.initialize() in the context of Node.js and Express

I am currently working on implementing the passport module in my application. After reading some manuals, I found this: app.use(passport.initialize()); app.use(passport.session()); Can someone explain what app.use(passport.initialize()) does exactly? I ...

How to remove various items from Google Cloud Storage with node.js

I'm looking to mass delete multiple objects from Google Cloud Storage. Currently, I've been deleting one object at a time using the following code: var gcloud = require('gcloud')({ projectId: "sampleProject1" }); var gcs = gcloud.sto ...

Uh-oh, gulp is nowhere to be found - It was smooth sailing up until now, and out

A few months back, I was developing web applications using the MEAN stack on a Windows 10 machine. After taking a break from it, I am now trying to dive back in. Previously, I used gulp, browsersync, webpack, and nodemon to automate my server restarting p ...