Pega React Component Creation Process Getting ERR_MODULE_NOT_FOUND Error
Hi,
In previous weeks, I followed these docs (https://docs.pega.com/bundle/constellation-dx-components/page/constellation-dx-components/custom-components/initialize-project.html) to initialize a project and execute "npm run create" to create a new component within the initialized project using the custom-dx-components module. Despite this same process working in previous weeks with the same versions utilized, attempting to execute "npm run create" now results in the following error trace. In my case, I have successfully initialized a project called "apitest":
PS C:\Users\nmalenfant\Documents\React\apitest> npm run create node:internal/modules/esm/resolve:265 throw new ERR_MODULE_NOT_FOUND( ^
Hi,
In previous weeks, I followed these docs (https://docs.pega.com/bundle/constellation-dx-components/page/constellation-dx-components/custom-components/initialize-project.html) to initialize a project and execute "npm run create" to create a new component within the initialized project using the custom-dx-components module. Despite this same process working in previous weeks with the same versions utilized, attempting to execute "npm run create" now results in the following error trace. In my case, I have successfully initialized a project called "apitest":
PS C:\Users\nmalenfant\Documents\React\apitest> npm run create node:internal/modules/esm/resolve:265 throw new ERR_MODULE_NOT_FOUND( ^
Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'C:\Users\nmalenfant\Documents\React\apitest\node_modules\@pega\custom-dx-components\node_modules\inquirer\lib\utils\readline.js' imported from C:\Users\nmalenfant\Documents\React\apitest\node_modules\@pega\custom-dx-components\src\tasks\revert-webpack\index.js at finalizeResolution (node:internal/modules/esm/resolve:265:11) at moduleResolve (node:internal/modules/esm/resolve:933:10) at defaultResolve (node:internal/modules/esm/resolve:1157:11) at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:383:12) at ModuleLoader.resolve (node:internal/modules/esm/loader:352:25) at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:227:38) at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:87:39) at link (node:internal/modules/esm/module_job:86:36) { code: 'ERR_MODULE_NOT_FOUND', url: 'file:///C:/Users/nmalenfant/Documents/React/apitest/node_modules/@pega/custom-dx-components/node_modules/inquirer/lib/utils/readline.js' }
Node.js v20.14.0
This was attempted for a version 8 of the custom-dx-components module and today the 23.1.13 version which previously was working. Nothing within my development environment has changed in terms of Node installs or otherwise. My current Node version is v20.14.0 and my current npm version is 10.7.0.
It is also valuable to note that I tried to install version 24.1.x but I wasn't even able to execute the initial "init" command for the project as the exact same error appears before a project can even be created. It feels as if there is some dependency issue for custom-dx-components.
Any help would be appreciated. Thank you.