web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Answered

D365 eCommerce/VisualStudio Code : (node:25180) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'substr' of undefined

(0) ShareShare
ReportReport
Posted on by 2,067

When setting up a eCommerce development environment as described here https://docs.microsoft.com/en-us/dynamics365/commerce/e-commerce-extensibility/setup-dev-environment I get the following error when running "yarn start".   Any idea on how to fix this ?

pastedimage1643986963663v1.png

I have the same question (0)
  • Sam Jarawan Profile Picture
    Microsoft Employee on at

    Hi Kurt,

    Can you confirm if you made any additional code changes or were you just following the direct steps in the document?

    Can you also confirm what version of Node you have installed, we don't curretly support the latest version only 12.x and that could be the root cause.

    If you open a command prompt and type in "node --version" it will print out the version name as shown below.

    pastedimage1643995747504v1.png

    If that's it, can you uninstall Node and reinstall 12.x.

    To get version 12.x click on the "Other downloads" link on the Node.js website:

    pastedimage1643995838980v2.png

    Then "Previous Releases:

    pastedimage1643995895343v3.png

    Then you can find the latest version of 12.x:

    pastedimage1643995976130v4.png

    I hope that helps,

    Sam

  • Verified answer
    Sam Jarawan Profile Picture
    Microsoft Employee on at

    Hi Kurt,

    Thanks for confirming you did have Node 12.x installed.

    I was able to repro the issue, there is a bug in the latest released SDK that just went live and we should have a fix published today.  In the mean-time here is the work around.

    1. Add "webpack-sources": "3.2.2" to "resolutions" section in package.json

    2. delete yarn.lock

    3. run yarn again

    Now run "yarn start" and all should be good.

    thanks,

    Sam

  • Suggested answer
    Kurt Hatlevik Profile Picture
    2,067 on at

    YES!   This works :-)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Laurens vd Tang Profile Picture

Laurens vd Tang 144 Super User 2026 Season 1

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 121 Super User 2026 Season 1

#3
Mallesh Deshapaga Profile Picture

Mallesh Deshapaga 108

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans