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

Unable to build after upgrading to Node 16 +

(0) ShareShare
ReportReport
Posted on by 45

Hi folks,

Recently I upgraded the node version on local machine to 16.15.0. After installing the updated version I am encountering the following error while running the yarn start command. I have tried deleting the node module, build and yarn.lock files as well but it didn't work.

I would really appreciate the suggestions to resolve these.

**ApplicationInsights:An invalid instrumentation key was provided. There may be resulting telemetry loss [ ' ' ]

\build\webpack:\lib\module-registration.js?44dd:2743
binding.dataActions[actionPath] = undefined;
^
ReferenceError: actionPath is not defined
at Module.registerAllModules (\build\webpack:\lib\module-registration.js?44dd:2743:37)
at Module../node_modules/@msdyn365-commerce/bootloader/entry/bootstrap.js (\build\webpack:\node_modules@msdyn365-commerce\bootloader\entry\bootstrap.js?d994:189:35)**

ERROR in ./lib/module-registration.js
Module not found: Error: Can't resolve 'hoisted/@msdyn365-commerce-modules/accordion/dist/lib/modules/accordion-item/accordion-item' in 'lib'
@ ./lib/module-registration.js
@ ./node_modules/@msdyn365-commerce/bootloader/entry/client.js
@ multi ./node_modules/error-overlay-webpack-plugin/lib/entry-basic.js ./node_modules/error-overlay-webpack-plugin/lib/entry-devserver.js? ./node_modules/@msdyn365-commerce/bootloader/entry/webpack-public-path.js webpack-dev-server/client?http://localhost:4001/ ./node_modules/@msdyn365-commerce/bootloader/entry/client
ERROR in ./lib/view-registration.js
Module not found: Error: Can't resolve 'hoisted/@msdyn365-commerce-modules/accordion/dist/lib/modules/accordion-item/accordion-item.view.js' in '\lib'
@ ./lib/view-registration.js
@ ./node_modules/@msdyn365-commerce/bootloader/entry/client.js
@ multi ./node_modules/error-overlay-webpack-plugin/lib/entry-basic.js ./node_modules/error-overlay-webpack-plugin/lib/entry-devserver.js? ./node_modules/@msdyn365-commerce/bootloader/entry/webpack-public-path.js webpack-dev-server/client?http://localhost:4001/ ./node_modules/@msdyn365-commerce/bootloader/entry/client

Thanks,

Aman

  • Suggested answer
    Aman Soni Profile Picture
    45 on at
    RE: Unable to build after upgrading to Node 16 +

    This issue mainly occurred due to the corrupt version of Node. The only possible solution for this is to make sure that all the dependencies required for Node (16+) are also installed.

    We can either download all the dependencies manually or just need to allow the node itself to download all the dependencies at the time of installation.

    pastedimage1652433702979v1.png

    Thanks,

    Aman

  • Aman Soni Profile Picture
    45 on at
    RE: Unable to build after upgrading to Node 16 +

    Hi Kurt, thanks for your valuable response.

    I have already tried deleting the whole folder and rerunning the yarn command, but it didn't work.

    I am not able to run the project due to these errors.

    ERROR in ./lib/module-registration.js

    Module not found: Error: Can't resolve 'hoisted/@msdyn365-commerce-modules/accordion/dist/lib/modules/accordion-item/accordion-item' in 'lib'

    @ ./lib/module-registration.js

    @ ./node_modules/@msdyn365-commerce/bootloader/entry/client.js

    @ multi ./node_modules/error-overlay-webpack-plugin/lib/entry-basic.js ./node_modules/error-overlay-webpack-plugin/lib/entry-devserver.js? ./node_modules/@msdyn365-commerce/bootloader/entry/webpack-public-path.js webpack-dev-server/client?http://localhost:4001/ ./node_modules/@msdyn365-commerce/bootloader/entry/client

    ERROR in ./lib/view-registration.js

    Module not found: Error: Can't resolve 'hoisted/@msdyn365-commerce-modules/accordion/dist/lib/modules/accordion-item/accordion-item.view.js' in '\lib'

    @ ./lib/view-registration.js

    @ ./node_modules/@msdyn365-commerce/bootloader/entry/client.js

    @ multi ./node_modules/error-overlay-webpack-plugin/lib/entry-basic.js ./node_modules/error-overlay-webpack-plugin/lib/entry-devserver.js? ./node_modules/@msdyn365-commerce/bootloader/entry/webpack-public-path.js webpack-dev-server/client?http://localhost:4001/ ./node_modules/@msdyn365-commerce/bootloader/entry/client

    Thanks,

    Aman

  • Suggested answer
    Kurt Hatlevik Profile Picture
    2,063 on at
    RE: Unable to build after upgrading to Node 16 +

    I had the same issue.  What I did was to first take a copy of my work and the .env file.  Den completely delete the Msdyn365.Commerce.Online and run:

    git clone https://github.com/microsoft/Msdyn365.Commerce.Online.git

    Then I ran yarn, and yarn msdyn365 pack.  

    I still have the following error :-- error message, Command failed: npm run start:prod
    ApplicationInsights:An invalid instrumentation key was provided. There may be resulting telemetry loss [ ' ' ]
    (node:35972) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
    (Use `node --trace-deprecation ...` to show where the warning was created)

    But it generated the Msdyn365.Commerce.Online-1.0.0.zip that could be uploaded to LCS and deployed.

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,129 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,895 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans