Skip to content

How to: Change NPM configuration to access CMF repository#

1. Open an instance of Windows Explorer#

Info

On the path directory search for the following: C:\\Users\\<User>\\.npmrc. Select Enter to open the file. If a prompt to select a program to open the file shows, use Windows built-in Notepad.

Howto changenpmconfigtocmfrepository image 1

2. On that file past the following text#

We will need to replace <USER_TOKEN> with a base64 token.

Howto changenpmconfigtocmfrepository image 2

3. Next open a PowerShell window as Administrator#

Howto changenpmconfigtocmfrepository image 3

4. Run the following command#

Info

Change the email with the email you have registered in the Customer Portal, and Token with your Access Token. You can reuse the Access Token you created for the deployment of the MES in the VM.

Howto changenpmconfigtocmfrepository image 4

5. After that, run the next command to convert to base64#

Howto changenpmconfigtocmfrepository image 5

6. Copy your result, it should be similar to the following one#

Howto changenpmconfigtocmfrepository image 6

7. Return to your .npmrc file#

Change the part with your base64 token.

Howto changenpmconfigtocmfrepository image 7

8. Your final .npmrc file should look like this#

Info

After this configuration, every time you use npm install, you will be using Critical Manufacturing productive repository

Howto changenpmconfigtocmfrepository image 8