Skip to content

NPM link tips

Mike edited this page Jul 29, 2025 · 3 revisions

Use wsman messages locally instead of the published library

At the root of this project

> cd ~/open-amt-cloud-toolkit/wsman-messages

Compile the project, which will create a ./dist folder with compilation artifacts

> npm run compile

Copy in the package.json

> cp package.json dist/

Now the dist folder is ready to be referenced as a published package, so navigatge to the project referencing wsman-messages and cre

> cd ~/open-amt-cloud-toolkit/rps
> npm link ../../wsman-messages/dist/

Check that the link is working

> npm compile

This will create a global npm link to the @open-amt-cloud-toolkit/wsman-messages that you can check with the following

> npm ls --location=global

To undo the links, in the referencing projects

> npm unlink @open-amt-cloud-toolkit/wsman-messages
Clone this wiki locally