Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Suggested answer

Help with NPM feed and publishing the package as an ISV

(0) ShareShare
ReportReport
Posted on by 10

Hi guys,

We are an ISV company and we have created some e-commerce modules to distribute together with our D365F&O solution.

We've heard from Microsoft that the best way to distribute these modules for partners/customers is creating a NPM feed... We've created this feed and published our package (created via "yarn msdyn365 pack") there, then we followed these steps to do the testing:

  • Creation of a new solution based on the Microsoft's sample solution from GitHub;
  • Changing the .yarnrc file, including our feed there;
  • Changing the package.json file, including our package there;
  • Executing the "yarn" command, a folder with our package was created inside the "node_modules" folder.

BUT, when trying to test our modules locally (https://localhost:4000/), the modules are not being executed:

 "k3-compositions 1' threw exception

Error: Module id: k3-compositions 1, type: k3-compositions is not registered"

modules_5F00_error.png

I also tried to import a package created from this "test solution" into the LCS, but I had the same problem, our modules are not available inside the site builder anymore.

Do you guys have an idea of what we are doing wrong?

Thank you in advance,

Luiz

  • LuizVentura Profile Picture
    10 on at
    RE: Help with NPM feed and publishing the package as an ISV

    Hi Sam,

    Thank you for your answer, we tried what you mentioned but we still have the issue.

    I will describe below in detail what we've done:

    1. We generated a new package from our solution, using "yarn msdyn365 pack";
    2. We extracted the package, opened it in VS Code, and created a .npmrc with the registry of our feed; (Image below);
    3. We also changed the package.json, inserting a namespace within the "name" field, and changed the "private" field to false; (Also image below)
    4. We uploaded the package to our feed, using the "npm publish" command, and it worked fine.

    package_5F00_to_5F00_upload.jpg

     5. Then, we created a new solution based on the Microsoft's sample solution from GitHub, to simulate the partner/customer solution;

     6. We changed the "platform.settings.json" file, as you mentioned; (Image below)

     7. We changed the ".yarnc" file; (Also image below)

     8. We also changed the "package.json" file, inserting our namespace within the "dependencies" (Also image below)

     9. We executed the "yarn" command, and a folder with the name of our namespace was created within the "node_modules" folder, the content of the folder is also in the image below.

    package_5F00_of_5F00_the_5F00_partner.jpg

    10. We generated a package from this solution, using "yarn msdyn365 pack";

    11. We uploaded the package in the LCS asset library and also applied the package in our environment;

    12. After all this process, we get the following error

    error_5F00_message.jpg

    I can see the "hello world" module there, so the package has been applied, but our modules are still not recognized.

    Best regards,

    Luiz

  • Suggested answer
    Sam Jarawan Profile Picture
    on at
    RE: Help with NPM feed and publishing the package as an ISV

    Hi Luiz,

    The problem is most likely that your namespace needs to be added to the platform.settings.json file so that SDK can register corresponding modules belonging to the namespace.

     

    Example:

     {

        "namespaceExtensions" : ["@msdyn365-commerce-modules"]

    }

     

    https://docs.microsoft.com/en-us/dynamics365/commerce/e-commerce-extensibility/platform-settings#namespaceextensions

    I hope that helps,

    Sam

  • Diogo_STMonteiro Profile Picture
    on at
    RE: Help with NPM feed and publishing the package as an ISV

    Hi Luiz,

    I just saw that you did the same question in the yammer community, let me follow up with Sam.

    Thank you!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,278 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,011 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans