adobe / aem-guides-wknd-spa

MIT License
71 stars 97 forks source link

[React] NPM Module re-naming causes build failure #8

Closed godanny86 closed 3 years ago

godanny86 commented 3 years ago

Recently @adobe/cq-react-editable-components was deprecated and renamed to @adobe/aem-react-editable-components

Code branches need to be updated to use the new library name otherwise failures like the following occur:

[ERROR] Error: Cannot find module '/code/aem-guides-wknd-spa/ui.frontend/node_modules/@adobe/cq-react-editable-components/deprecated.js'
[ERROR]     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:980:15)
[ERROR]     at Function.Module._load (internal/modules/cjs/loader.js:862:27)
[ERROR]     at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
[ERROR]     at internal/main/run_main_module.js:17:47 {
[ERROR]   code: 'MODULE_NOT_FOUND',
[ERROR]   requireStack: []
[ERROR] }
godanny86 commented 3 years ago

This is fixed by updating the dependencies in package.json:

-   "@adobe/cq-react-editable-components": "^1.2.1",
-   "@adobe/cq-spa-component-mapping": "^1.0.3",
-   "@adobe/cq-spa-page-model-manager": "^1.1.3",
+  "@adobe/aem-react-editable-components": "^1.0.0",
+  "@adobe/aem-spa-component-mapping": "^1.0.0",
+  "@adobe/aem-spa-page-model-manager": "^1.0.0"