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
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.
Thanks,
Aman
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
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.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156