cannot find module 'next/server'


at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15) 'C:\Users\kevin\ActiveGitHub\#fun\fun-mdb5\node_modules\next\dist\next-server\server\api-utils.js', at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15) Error: Cannot find module at Function.mod._resolveFilename (C:\Users\kevin\ActiveGitHub#fun\fun-mdb5\node_modules\next\dist\build\webpack\require-hook.js:4:1855) Expected behavior 'C:\Users\kevin\ActiveGitHub\#fun\fun-mdb5\node_modules\next\dist\server\next.js'. at Function.mod._resolveFilename (C:\Users\kevin\ActiveGitHub#fun\fun-mdb5\node_modules\next\dist\build\webpack\require-hook.js:4:1855) 'C:\Users\kevin\ActiveGitHub\#fun\fun-mdb5\node_modules\next\dist\server\next.js', ../../#fun/fun-mdb5/node_modules/next/dist/client/dev/amp-dev.js Error: Cannot find module Wojciech Staniszewski Once npx with nextjs you have to remove some packages that nextjs doesn't need that MDB uses by default for example it may install react-router-dom which is not needed by next. priority Has the problem already occurred before adding MDBReact to the project? at DevServer.findPageComponents (C:\Users\kevin\ActiveGitHub#fun\fun-mdb5\node_modules\next\dist\next-server\server\next-server.js:77:296) 'C:\Users\kevin\ActiveGitHub\#fun\fun-mdb5\node_modules\next\dist\server\lib\start-server.js', at DevServer.renderErrorToHTML (C:\Users\kevin\ActiveGitHub#fun\fun-mdb5\node_modules\next\dist\next-server\server\next-server.js:139:209) ins1d30ut at Function.Module._load (internal/modules/cjs/loader.js:746:27) at loadDefaultErrorComponents (C:\Users\kevin\ActiveGitHub#fun\fun-mdb5\node_modules\next\dist\next-server\server\load-components.js:1:652) event - build page: /next/dist/pages/_error wait - compiling error. 'C:\Users\kevin\ActiveGitHub\#fun\fun-mdb5\node_modules\next\dist\next-server\server\load-components.js', I am pretty new to using the reactjs framework and realize that nextjs is a reactjs framework. You can add max. Or the error has shown up just after installing MDB? 'C:\Users\kevin\ActiveGitHub#fun\fun-mdb5\node_modules\@next\react-refresh-utils\loader.js' Is there another way of building my app using CRA and 'transforming' it into a nextjs app? at Function.Module._load (internal/modules/cjs/loader.js:746:27) ] } wait - compiling error - Require stack: C:\Users\kevin\ActiveGitHub#fun\fun-mdb5\node_modules\next\dist\next-server\server\api-utils.js, C:\Users\kevin\ActiveGitHub#fun\fun-mdb5\node_modules\next\dist\next-server\server\next-server.js. at loadComponents (C:\Users\kevin\ActiveGitHub#fun\fun-mdb5\node_modules\next\dist\next-server\server\load-components.js:1:1289) 'C:\Users\kevin\ActiveGitHub#fun\fun-mdb5\node_modules\@next\react-refresh-utils\loader.js' length of 2 each, https://nextjs.org/docs/messages/webpack5, https://mdbootstrap.com/docs/b5/react/pro/installation/, C:\Users\kevin\ActiveGitHub#fun\fun-mdb5\node_modules\next\dist\next-server\server\config-utils.js, C:\Users\kevin\ActiveGitHub#fun\fun-mdb5\node_modules\next\dist\bin\next Require stack: C:\Users\kevin\ActiveGitHub#fun\fun-mdb5\node_modules\next\dist\bin\next.

at require (internal/modules/cjs/helpers.js:92:18) commented 11 months ago. commented 11 months ago. at processTicksAndRejections (internal/process/task_queues.js:95:5) ../../#fun/fun-mdb5/node_modules/next/dist/client/dev/amp-dev.js at require (internal/modules/cjs/helpers.js:92:18) priority - C:\Users\kevin\ActiveGitHub#fun\fun-mdb5\node_modules\next\dist\compiled\webpack\bundle5.js, C:\Users\kevin\ActiveGitHub#fun\fun-mdb5\node_modules\next\dist\compiled\webpack\webpack.js, C:\Users\kevin\ActiveGitHub#fun\fun-mdb5\node_modules\next\dist\next-server\server\config-utils-worker.js, C:\Users\kevin\ActiveGitHub#fun\fun-mdb5\node_modules\next\dist\next-server\server\config.js, C:\Users\kevin\ActiveGitHub#fun\fun-mdb5\node_modules\next\dist\server\next.js, C:\Users\kevin\ActiveGitHub#fun\fun-mdb5\node_modules\next\dist\server\lib\start-server.js, C:\Users\kevin\ActiveGitHub#fun\fun-mdb5\node_modules\next\dist\cli\next-dev.js, C:\Users\kevin\ActiveGitHub#fun\fun-mdb5\node_modules\next\dist\compiled\webpack\bundle5.js, C:\Users\kevin\ActiveGitHub#fun\fun-mdb5\node_modules\next\dist\next-server\server\require.js, C:\Users\kevin\ActiveGitHub#fun\fun-mdb5\node_modules\next\dist\next-server\server\load-components.js. 'C:\Users\kevin\ActiveGitHub\#fun\fun-mdb5\node_modules\next\dist\next-server\server\require.js', at async Object.fn (C:\Users\kevin\ActiveGitHub#fun\fun-mdb5\node_modules\next\dist\next-server\server\next-server.js:58:672) { code: 'MODULE_NOT_FOUND', requireStack: [ 'C:\Users\kevin\ActiveGitHub\#fun\fun-mdb5\node_modules\next\dist\cli\next-dev.js', 'C:\Users\kevin\ActiveGitHub#fun\fun-mdb5\node_modules\@next\react-refresh-utils\loader.js' staff ), ready - started server on 0.0.0.0:3000, url: http://localhost:3000 'C:\Users\kevin\ActiveGitHub\#fun\fun-mdb5\node_modules\next\dist\next-server\server\next-server.js', ins1d30ut staff 'C:\Users\kevin\ActiveGitHub\#fun\fun-mdb5\node_modules\next\dist\bin\next' Hire our experts to build a dedicated project. Get useful tips & free resources directly to your inbox along with exclusive subscriber-only content. at Module.require (internal/modules/cjs/loader.js:974:19) free 'C:\Users\kevin\ActiveGitHub#fun\fun-mdb5.next\fallback-build-manifest.json' { code: 'MODULE_NOT_FOUND', requireStack: [ answered 11 months ago. Did you install MDBReact Pro with npm like described here: https://mdbootstrap.com/docs/b5/react/pro/installation/? 'C:\Users\kevin\ActiveGitHub\#fun\fun-mdb5\node_modules\next\dist\next-server\server\load-components.js', at async DevServer.render (C:\Users\kevin\ActiveGitHub#fun\fun-mdb5\node_modules\next\dist\next-server\server\next-server.js:75:160) Amware localhost just says 'Internal Host Error', Resources (screenshots, code snippets etc. yes. at getPagePath (C:\Users\kevin\ActiveGitHub#fun\fun-mdb5\node_modules\next\dist\next-server\server\require.js:1:735) ] } Error: Cannot find module commented 11 months ago. Require stack: C:\Users\kevin\ActiveGitHub#fun\fun-mdb5\node_modules\next\dist\bin\next info - Using webpack 5. at requirePage (C:\Users\kevin\ActiveGitHub#fun\fun-mdb5\node_modules\next\dist\next-server\server\require.js:1:1397) at Module.require (internal/modules/cjs/loader.js:974:19) Require stack: Wojciech Staniszewski at DevServer.renderErrorToHTML (C:\Users\kevin\ActiveGitHub#fun\fun-mdb5\node_modules\next\dist\next-server\server\next-server.js:139:962) Create a nextjs project using npx create-next-app and installing the reactjs mdb pro package through cli and having a working project with the ability to use the MBD Pro features. https://nextjs.org/docs/messages/webpack5 error - We'll analyze your business requirements, for free. C:\Users\kevin\ActiveGitHub#fun\fun-mdb5\node_modules\next\dist\bin\next C:\Users\kevin\ActiveGitHub#fun\fun-mdb5\node_modules\next\dist\bin\next Require stack: 'C:\Users\kevin\ActiveGitHub\#fun\fun-mdb5\node_modules\next\dist\next-server\server\next-server.js', Reason: Enabled by default Also if you are using any Nav components you have to use the next ones then add the classes on the tag to style with MDB. 'C:\Users\kevin\ActiveGitHub#fun\fun-mdb5.next\server\pages-manifest.json' I also realize that the way that nextjs organizes its folders and files is a little different than a normal react app. 'C:\Users\kevin\ActiveGitHub\#fun\fun-mdb5\node_modules\next\dist\server\lib\start-server.js', 'C:\Users\kevin\ActiveGitHub\#fun\fun-mdb5\node_modules\next\dist\cli\next-dev.js', Error: Cannot find module Error: Cannot find module Actual behavior 'C:\Users\kevin\ActiveGitHub\#fun\fun-mdb5\node_modules\next\dist\bin\next' ../../#fun/fun-mdb5/node_modules/next/dist/client/dev/amp-dev.js 'C:\Users\kevin\ActiveGitHub\#fun\fun-mdb5\node_modules\next\dist\next-server\server\api-utils.js', I didexcept I ran npx create-next-app instead of creating a react app. 10 tags with min. asked 11 months ago.