-
-
Notifications
You must be signed in to change notification settings - Fork 323
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
Mysql module not added in correct yarn workspace. Error in yarn seed. #1184
Comments
After adding package in server workspace via lerna:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Yarn seed with DB_CLIENT=mysql fails.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
knex data migration completed succesfully
Log
lerna notice cli v3.16.4 lerna info versioning independent lerna info filter [ 'server' ] lerna info Executing command in 1 package: "yarn run seed" server: $ yarn migrate && knex seed:run server: $ knex migrate:latest server: Using environment: development server: Knex: run server: $ npm install mysql --save server: Error: Cannot find module 'mysql' server: at Module._resolveFilename (internal/modules/cjs/loader.js:636:15) server: at Function.realResolve [as _resolveFilename] (/Users/narya/Documents/proj1/lerna-proj/apollo-universal-starter-kit/modules/database/server-ts/knexdata.js:27:20) server: at Function.Module._load (internal/modules/cjs/loader.js:562:25) server: at Module.require (internal/modules/cjs/loader.js:692:17) server: at require (internal/modules/cjs/helpers.js:25:18) server: at Client_MySQL._driver (/Users/narya/Documents/proj1/lerna-proj/apollo-universal-starter-kit/node_modules/knex/lib/dialects/mysql/index.js:73:12) server: at Client_MySQL.initializeDriver (/Users/narya/Documents/proj1/lerna-proj/apollo-universal-starter-kit/node_modules/knex/lib/client.js:254:26) server: at Client_MySQL.Client (/Users/narya/Documents/proj1/lerna-proj/apollo-universal-starter-kit/node_modules/knex/lib/client.js:115:10) server: at new Client_MySQL (/Users/narya/Documents/proj1/lerna-proj/apollo-universal-starter-kit/node_modules/knex/lib/dialects/mysql/index.js:62:20) server: at Knex (/Users/narya/Documents/proj1/lerna-proj/apollo-universal-starter-kit/node_modules/knex/lib/index.js:60:34) server: at initKnex (/Users/narya/Documents/proj1/lerna-proj/apollo-universal-starter-kit/node_modules/knex/bin/cli.js:69:10) server: at Command.<anonymous> (/Users/narya/Documents/proj1/lerna-proj/apollo-universal-starter-kit/node_modules/knex/bin/cli.js:127:17) server: at Command.listener (/Users/narya/Documents/proj1/lerna-proj/apollo-universal-starter-kit/node_modules/commander/index.js:315:8) server: at Command.emit (events.js:198:13) server: at Command.parseArgs (/Users/narya/Documents/proj1/lerna-proj/apollo-universal-starter-kit/node_modules/commander/index.js:651:12) server: at Command.parse (/Users/narya/Documents/proj1/lerna-proj/apollo-universal-starter-kit/node_modules/commander/index.js:474:21) server: error Command failed with exit code 1. server: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. server: error Command failed with exit code 1. server: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. lerna ERR! yarn run seed exited 1 in 'server' error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Desktop (please complete the following information):
Question
I cam add mysql module via
Yarn add mysql
error Running this command will add the dependency to the workspace root rather than the workspace itself, which might not be what you want - if you really meant it, make it explicit by running this command again with the -W flag (or --ignore-workspace-root-check). info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
But I think this module should be loaded already. Also if it needs manual additional which yarn workspace should I add it under?
The text was updated successfully, but these errors were encountered: