Npm config set not working2/14/2023 # Make sure you replace $"Īnd then npm install should work in the gitlab as well. Scoped packages always begin with an symbol. Scoped packages have names with the format of owner/name. GitHub Packages only supports scoped npm packages. npmrc file in the project or using the publishConfig option in the package.json. package with name will use this URL for Add the token for the scoped packages URL. You can set up the scope mapping for your project using either a local. To verify the installation, open a new terminal window and run: node -version. Node is bundled with npm, the package manager for JavaScript. We recommend selecting the LTS version to ensure best compatibility. Here is what i did:Ĭreate a personal access token from Gitlab with the permissions read_api and read_registry.Įxpose this personal access token in the gitlab ci pipeline through a variableĮnsure the. The download page has prebuilt installation packages for all platforms. I managed to get it to work with a separate personal access token. I have also cleared the gitlab runner cache several times.Īccessing the url also works via the browser.ĭo you have an idea why it works locally and fails on gitlab ci cd even with the same access tokens and. npmrc in the gitlab-ci.yml as well and I have tried out several auth keys, including my personal access token and the $CI_JOB_TOKEN. npmrc with my personal access token accordingly and when executing npm install it fails when the gitlab pipeline wants to install it with the following messages: npm ERR! code E404Ħ4npm ERR! 404 is not in the npm registry. But, if i write npm config get init-main it returns 'script.js'. In another private project, I want to consume this npm package. npm config set command not working properly Ask Question 1 i set the default config for the package.json file using the command, npm config set init-main 'script.js' after this i initialized a folder using npm init -yes but the main is still 'index.js'. I have published the npm package to without a problem.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |