karanpratapsingh / fullstack-starterkit

GraphQL first full-stack starter kit with Node, React. Powered by TypeScript
MIT License
1.17k stars 100 forks source link

yarn command fails during install of @project-backend/db packages and generating prisma schema #21

Closed dustingauthier closed 4 years ago

dustingauthier commented 4 years ago

After following the instructions in the readme, I am having an issue with installing the backend dependencies. Please see the output from terminal below.

$ yarn
yarn install v1.22.5
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized loc
k files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@2.1.3: The platform "win32" is incompatible with this module.
info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > apollo-server-express@2.18.2" has unmet peer dependency "graphql@^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0".
warning "apollo-server-express > apollo-server-core@2.18.2" has unmet peer dependency "graphql@^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0".
warning "apollo-server-express > apollo-server-types@0.6.0" has unmet peer dependency "graphql@^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0".
warning "apollo-server-express > graphql-subscriptions@1.1.0" has unmet peer dependency "graphql@^0.10.5 || ^0.11.3 || ^0.12.0 || ^0.13.0 || ^14.0.0".
warning "apollo-server-express > graphql-tools@4.0.8" has unmet peer dependency "graphql@^0.13.0 || ^14.0.0 || ^15.0.0".
warning "apollo-server-express > subscriptions-transport-ws@0.9.18" has unmet peer dependency "graphql@>=0.10.0".
warning "apollo-server-express > apollo-server-core > apollo-cache-control@0.11.3" has unmet peer dependency "graphql@^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0".
warning "apollo-server-express > apollo-server-core > apollo-graphql@0.6.0" has unmet peer dependency "graphql@^14.2.1 || ^15.0.0".
warning "apollo-server-express > apollo-server-core > apollo-server-errors@2.4.2" has unmet peer dependency "graphql@^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0".
warning "apollo-server-express > apollo-server-core > apollo-server-plugin-base@0.10.1" has unmet peer dependency "graphql@^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0".
warning "apollo-server-express > apollo-server-core > apollo-tracing@0.11.4" has unmet peer dependency "graphql@^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0".
warning "apollo-server-express > apollo-server-core > graphql-extensions@0.12.5" has unmet peer dependency "graphql@^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0".
warning "apollo-server-express > apollo-server-core > graphql-tag@2.11.0" has unmet peer dependency "graphql@^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0".
warning "apollo-server-express > apollo-server-core > graphql-upload@8.1.0" has unmet peer dependency "graphql@0.13.1 - 14".
warning "apollo-server-express > graphql-tools > apollo-link@1.2.14" has unmet peer dependency "graphql@^0.11.3 || ^0.12.3 || ^0.13.0 || ^14.0.0 || ^15.0.0".
warning "apollo-server-express > graphql-tools > apollo-utilities@1.3.4" has unmet peer dependency "graphql@^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0".
warning "workspace-aggregator-7d3ab4bd-a8ea-40e1-aad1-ca4a9144a6ec > @project-backend/graphql > @graphql-codegen/typescript-react-apollo@2.0.7" has unmet peer dependency "graphql-tag@^2.0.0".
warning "workspace-aggregator-7d3ab4bd-a8ea-40e1-aad1-ca4a9144a6ec > @project-backend/graphql > graphql-tools > @graphql-tools/links > apollo-upload-client@14.1.2" has unmet peer dependency "subscriptions-transport-ws
@^0.9.0".
[4/4] Building fresh packages...
[9/9] ⠈ @project-backend/db
[-/9] ⠁ waiting...
[-/9] ⠁ waiting...
[-/9] ⠁ waiting...
error C:\Users\Dev\Desktop\fullstack-starterkit-master\backend\node_modules\@project-backend\db: Command failed.
Exit code: 1
Command: yarn generate
Arguments:
Directory: C:\Users\Dev\Desktop\fullstack-starterkit-master\backend\node_modules\@project-backend\db
Output:
yarn run v1.22.5
$ yarn prisma generate --schema=./prisma/schema.prisma
$ C:\Users\Dev\Desktop\fullstack-starterkit-master\backend\node_modules\@project-backend\db\node_modules\.bin\prisma generate --schema=./prisma/schema.prisma
internal/modules/cjs/loader.js:800
    throw err;
    ^

Error: Cannot find module 'C:\Users\Dev\Desktop\fullstack-starterkit-master\backend\node_modules\node_modules\@prisma\cli\build\index.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:15)
    at Function.Module._load (internal/modules/cjs/loader.js:690:27)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
    at internal/main/run_main_module.js:17:11 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
error Command failed with exit code 1.
karanpratapsingh commented 4 years ago

thanks for sharing, jeez windows always comes up with an new issue with yarn workspaces. I will try to fix it

karanpratapsingh commented 4 years ago

hey @dustingauthier I was able to reproduce this on my windows machine and hence fixed it in PR #22 feel free to reopen the issue if it doesn't work, thanks

dustingauthier commented 4 years ago

Works great. Thank you!