Blitz.JS でアプリを作成後、Blitz.JS 公式サイトの手順に従いHerokuにデプロイしようとしたところ、Release phase時に
Error: Cannot find module 'prisma' Require stack:- /app/noop.js Code: MODULE_NOT_FOUND
というエラーが発生。
json
1{ 2 "name": "blitz", 3 "version": "1.0.0", 4 "scripts": { 5 "dev": "blitz dev", 6 "build": "blitz build", 7 "start:production": "blitz start --port $PORT", 8 "studio": "blitz prisma studio", 9 "lint": "eslint --ignore-path .gitignore --ext .js,.ts,.tsx .", 10 "test": "jest", 11 "test:watch": "jest --watch" 12 }, 13 "prisma": { 14 "schema": "db/schema.prisma" 15 }, 16 "prettier": { 17 "semi": false, 18 "printWidth": 100 19 }, 20 "lint-staged": { 21 "*.{js,ts,tsx}": [ 22 "eslint --fix" 23 ] 24 }, 25 "dependencies": { 26 "@fortawesome/fontawesome-svg-core": "1.2.35", 27 "@fortawesome/free-solid-svg-icons": "5.15.3", 28 "@fortawesome/react-fontawesome": "0.1.14", 29 "@prisma/client": "2.26.0", 30 "@tailwindcss/line-clamp": "0.2.1", 31 "axios": "0.21.1", 32 "blitz": "0.38.2", 33 "final-form": "4.20.2", 34 "passport-github": "1.1.0", 35 "passport-google-oauth2": "0.2.0", 36 "react": "alpha", 37 "react-dom": "alpha", 38 "react-final-form": "6.5.3", 39 "react-intersection-observer": "8.32.0", 40 "react-loading": "2.0.3", 41 "react-transition-group": "4.4.2", 42 "recoil": "0.3.1", 43 "xmljson": "0.2.0", 44 "zod": "3.3.4" 45 }, 46 "devDependencies": { 47 "@types/preview-email": "2.0.0", 48 "@types/react": "17.0.13", 49 "autoprefixer": "10.2.6", 50 "eslint": "7.30.0", 51 "husky": "6.0.0", 52 "lint-staged": "10.5.4", 53 "prettier": "2.3.2", 54 "prettier-plugin-prisma": "0.13.2", 55 "pretty-quick": "3.1.1", 56 "preview-email": "3.0.4", 57 "prisma": "2.26.0", 58 "tailwindcss": "2.2.4", 59 "typescript": "~4.3" 60 }, 61 "private": true 62} 63
Procfile
1release: npx blitz prisma migrate deploy 2web: npm run start:production
<試したこと>
prismaがインストールされているか確認した。
<参考サイト>
https://blitzjs.com/docs/deploy-heroku
よろしくお願いします。
あなたの回答
tips
プレビュー