themefisher / bookworm-light-nextjs

Bookworm is a minimal NextJs, Tailwind CSS blog starter template.

Home Page:https://bookworm-light-nextjs.vercel.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lib/jsonGenerator.js

Alirazahaider opened this issue · comments

When I run your provided commands it says this.
I have installed latest node

Error:

PS C:\Users\Mega Computers\Downloads\Compressed\bookworm-light-nextjs-main_2\bookworm-light-nextjs-main> npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: bookworm-light-nextjs@2.0.0
npm ERR! Found: react@18.2.0
npm ERR! node_modules/react
npm ERR! react@"18.2.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@">=16.x <=17.x" from next-mdx-remote@3.0.8
npm ERR! node_modules/next-mdx-remote
npm ERR! next-mdx-remote@"^3.0.8" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! C:\Users\Mega Computers\AppData\Local\npm-cache_logs\2023-06-02T18_54_28_538Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Mega Computers\AppData\Local\npm-cache_logs\2023-06-02T18_54_28_538Z-debug-0.log
PS C:\Users\Mega Computers\Downloads\Compressed\bookworm-light-nextjs-main_2\bookworm-light-nextjs-main> npm run dev

bookworm-light-nextjs@2.0.0 dev
node lib/jsonGenerator.js && next dev

node:internal/modules/cjs/loader:1078
throw err;
^

Error: Cannot find module 'gray-matter'
Require stack:

  • C:\Users\Mega Computers\Downloads\Compressed\bookworm-light-nextjs-main_2\bookworm-light-nextjs-main\lib\jsonGenerator.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
    at Module._load (node:internal/modules/cjs/loader:920:27)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object. (C:\Users\Mega Computers\Downloads\Compressed\bookworm-light-nextjs-main_2\bookworm-light-nextjs-main\lib\jsonGenerator.js:3:16)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    'C:\Users\Mega Computers\Downloads\Compressed\bookworm-light-nextjs-main_2\bookworm-light-nextjs-main\lib\jsonGenerator.js'
    ]
    }
commented

Did you run npm install before npm run dev ?

commented

try npm install --force