web
You’re offline. This is a read only version of the page.
close
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

I have the same question (0)
  • Diogo_STMonteiro Profile Picture
    on at

    Hi Luiz,

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

    Thank you!

  • Suggested answer
    Sam Jarawan Profile Picture
    on at

    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

  • LuizVentura Profile Picture
    10 on at

    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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Laurens vd Tang Profile Picture

Laurens vd Tang 301 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 118 Super User 2025 Season 2

#3
Siv Sagar Profile Picture

Siv Sagar 105 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans