Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blitz breaks when Prisma is not installed in certain environments #501

Closed
merelinguist opened this issue Apr 29, 2020 · 0 comments · Fixed by blitz-js/blitz#438
Closed

Comments

@merelinguist
Copy link
Contributor

What is the problem?

Steps to Reproduce:

  1. See this CodeSandbox

  2. Run yarn start

  3. This error should be produced:

sandbox@sse-sandbox-j5drt:/sandbox$ yarn start
yarn run v1.22.4
warning package.json: No license field
$ blitz start
You are using alpha software - if you have any problems,please open an issue here:
  https://github.com/blitz-js/blitz/issues/new/choose

(node:418) UnhandledPromiseRejectionWarning: Error: Cannot find module '@prisma/cli'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at resolveFileName (/sandbox/node_modules/resolve-from/index.js:29:39)
    at resolveFrom (/sandbox/node_modules/resolve-from/index.js:43:9)
    at module.exports (/sandbox/node_modules/resolve-from/index.js:46:47)
    at module.exports.moduleId (/sandbox/node_modules/resolve-cwd/index.js:4:30)
    at Object.resolveBinAsync (/sandbox/node_modules/@blitzjs/server/dist/server.cjs.development.js:1372:35)
    at getPrismaBin (/sandbox/node_modules/@blitzjs/cli/lib/src/commands/db.js:12:37)
    at /sandbox/node_modules/@blitzjs/cli/lib/src/commands/db.js:16:29
    at Generator.next (<anonymous>)
    at /sandbox/node_modules/tslib/tslib.js:113:75
(node:418) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:418) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Versions:

debug: local
debug: pkgPath: /sandbox/node_modules/@blitzjs/cli

Linux 4.19 | linux-x64 | Node: v10.20.1

blitz: 0.7.0 (global)
blitz: 0.7.0 (local)

Supporting Documentation

See above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants