Topic: Can't Get Started
                  
                  pd1748
                  priority
                  asked 4 years ago
                
Demo Project - Straight from pro download, extract to directory , npm install. npm start
Tried several ways of doing all with same result. I am able to get other react projects working without issue.
You get this:::::
Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons: 1. You might have mismatching versions of React and the renderer (such as React DOM) 2. You might be breaking the Rules of Hooks 3. You might have more than one copy of React in the same app See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem. ./src/index.js/< C:/Users/p_m_k/source/repos/lunamanagement/src/index.js:11
8 | 9 | import registerServiceWorker from './registerServiceWorker'; 10 |
11 | ReactDOM.render( , document.getElementById('root')); 12 | 13 | registerServiceWorker();
./src/index.js http://localhost:3000/static/js/main.chunk.js:433:30 webpack_require C:/Users/p_m_k/source/repos/lunamanagement/webpack/bootstrap:851
848 | 849 | webpack_require.$Refresh$.init(); 850 | try {
851 | modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId)); | ^ 852 | } finally { 853 | webpack_require.$Refresh$.cleanup(moduleId); 854 | }
fn C:/Users/p_m_k/source/repos/lunamanagement/webpack/bootstrap:150
147 | ); 148 | hotCurrentParents = []; 149 | }
150 | return webpack_require(request); | ^ 151 | }; 152 | var ObjectFactory = function ObjectFactory(name) { 153 | return {
1 http://localhost:3000/static/js/main.chunk.js:620:18 webpack_require C:/Users/p_m_k/source/repos/lunamanagement/webpack/bootstrap:851
848 | 849 | webpack_require.$Refresh$.init(); 850 | try {
851 | modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId)); | ^ 852 | } finally { 853 | webpack_require.$Refresh$.cleanup(moduleId); 854 | }
checkDeferredModules C:/Users/p_m_k/source/repos/lunamanagement/webpack/bootstrap:45
42 | } 43 | if(fulfilled) { 44 | deferredModules.splice(i--, 1);
45 | result = webpack_require(__webpack_require__.s = deferredModule[0]); | ^ 46 | } 47 | } 48 |
webpackJsonpCallback C:/Users/p_m_k/source/repos/lunamanagement/webpack/bootstrap:32
29 | deferredModules.push.apply(deferredModules, executeModules || []); 30 | 31 | // run deferred modules when all chunks ready
32 | return checkDeferredModules(); | ^ 33 | }; 34 | function checkDeferredModules() { 35 | var result;
(anonymous function) http://localhost:3000/static/js/main.chunk.js:1:69
Resources (screenshots, code snippets etc.)
                      
                      web_ntx
                      premium
                        answered 4 years ago
                    
This issue occurs when you install using npm instead of yarn.
To solve it, first install yarn using npm install --global yarn, and then follow the setup instructions using yarn.
Wojciech Staniszewski staff commented 4 years ago
Thanks for Your response. We will take a closer look at this issue soon.
                      
                      Krzysztof Wilk
                      staff
                        answered 4 years ago
                    
Hi!
You can go straight to the folder, where you unzipped your package, and there use the npm link <path_to_local_library>/node_modules/react command. 
Also npm dedupe command should be helpful :)
Best regards
web_ntx premium commented 4 years ago
This does not work.
$ npm link C:\Users\Luke\Code\node\ntx-db-mdb\node_modules\react<br>
npm ERR! code ENOLOCAL<br>
npm ERR! Could not install from "UsersLukeCodenodentx-db-mdbnode_modulesreact" as it does not contain a package.json file.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Priority
 - Premium support: Yes
 - Technology: MDB React
 - MDB Version: 5.0.1
 - Device: Any
 - Browser: Any
 - OS: Windows 10
 - Provided sample code: No
 - Provided link: Yes