npm run dev throwing error
Yashhh08 opened this issue · comments
```
$ npm run email
emails@0.1.0 email
email dev
React Email 2.0.0
Running preview at: http://localhost:3000
⠙ Getting react-email preview server ready...
Error: > Couldn't find any pages
or app
directory. Please create one under the project root
at findPagesDir (D:\Yash Yerunkar\Email Templates\emails\node_modules\react-email\node_modules\next\dist\lib\find-pages-dir.js:42:15)
at initialize (D:\Yash Yerunkar\Email Templates\emails\node_modules\react-email\node_modules\next\dist\server\lib\router-server.js:71:69)
at async NextCustomServer.prepare (D:\Yash Yerunkar\Email Templates\emails\node_modules\react-email\node_modules\next\dist\server\next.js:240:28)
shutting down dev server
getting above issue my package.json configs are as below:
{
"name": "emails",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"email": "email dev"
},
"dependencies": {
"@react-email/components": "0.0.14",
"next": "14.1.0",
"react": "^18",
"react-dom": "^18",
"react-email": "2.0.0"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"autoprefixer": "^10.0.1",
"postcss": "^8",
"tailwindcss": "^3.3.0",
"typescript": "^5"
}
}
_Originally posted by @Yashhh08 in https://github.com/resend/react-email/issues/747#issuecomment-1935456995_