Table of Contents | ||||
---|---|---|---|---|
|
...
Navigate to the root directory of your web application where you want to use our SDK.
Create a new file and name it
.npmrc
Copy and paste this code into the
.npmrc
file exactly as is:Code Block email=support@marxent.com always-auth=true registry=https://nexus.3dcloud.io/repository/npm-group/ _auth=<insert token here>
Save the file. NOTE: It won’t be functional yet, now we need to generate the auth token.
Generate the
_auth
tokenIf you already have an account on Marxent’s private nexus NPM repository, you will use your username and password.
If you need a NEW account on Marxent’s private nexus NPM repository: contact your Marxent Account Director to get your username and password.
If you’re ready to dive in right now, try a CDN Implementation.
Open a new Unix or Linux terminal shell.
Run the command
echo -n 'myuser:mypassword'| openssl base64
to get your auth token.Replace
'myuser:mypassword'
with the username and password that you retrieved above.
This command will output an encoded key that you will use to replace
<insert token here>
in your.npmrc
file.Open your
.npmrc
file and replace the<insert auth token here>
with the output from above. Example:c2VhdHRsZTp3bT1AMl80QipQN3Z0JHUl
Example NEW
.npmrc
file:Code Block email=support@marxent.com always-auth=true registry=https://nexus.3dcloud.io/repository/npm-group/ _auth=c2VhdHRsZTp3bT1AMl80QipQN3Z0JHUl
...
Open your
package.json
in the root directory where you want to use our SDKNavigate to the
"dependencies":
sectionAdd our package as a dependency.
Ask your Account Director for the latest and greatest version to use!
In your package.json, under
"dependencies":
section, add"@mxt/mxt-webar-sdk": "67.75.0",
When completed, your dependencies package will look something like this:
Code Block "dependencies": { ... "@mxt/mxt-webar-sdk": "67.75.0", ... }
Run
npm install
If this doesn’t work, please note that we have had some problems with certain versions of NPM accessing our nexus repository. In this case:
NPM version MUST be 6.x.x because 7.x.x will NOT connect to our nexus repo
To check: open your terminal, and run the command
npm -v
NOTE: If using a Mac with a M1 processor, a newer version of node than 8 is required because 8 is not compatible with the ARM architecture. In this case, use node
v14.18.3
, as it is the last version of node to ship with npm v6.x (in this case,v6.14.15
), also found on this page.
...