npx convex import - always pushes to the same/wrong project
👋
Trying to get some test data into a table and for whatever reason, whenever I run
npx convex import
... , the data always gets written to the wrong project in my account.
- I only have 2 projects in my account. Projects A & B. I would like to import data into project B. If it matters, project A was created first.
- Whenever I run the command, data is always written to project A.
- When first prompted to select a project, I am picking project B.
- I have also tried running npx convex dev --project B
- I have also tried starting over and was re prompted for which project to work with; I also chose project B then and the same issue occurs.
- I have also tried deleting project B and re-creating it via the cli but the issue persists.
- I have double checked the env file; it does appear to point to the correct project.
Ultimately I can just manually create everything but it'd be nice to not have to do so. Am I missing something?
Thanks! 🎉3 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
That's unexpected.
npx convex import
should always use the same project as npx convex dev
uses. Troubleshooting:
1. do you happen to have the environment variable CONVEX_DEPLOY_KEY
set?
2. Which project does npx convex dashboard
open? And which does npx convex run
run functions in? These should be the same as npx convex import
3. What is the CONVEX_DEPLOYMENT in your .env.local file? Does it match a deployment name for project A or B?Thanks for the notes @lee
I'm not sure what happened but things seem to be working now after trying things after completely nuking my project files and restarting everything (not a big deal, just starting things anyways). In any case...
1. I did catch the global env variable being set earlier but I was still seeing the same activity for some reason.
2. I didn't think to try that but will keep in mind next time
3. Env variables looked fine and appeared to be pointing to project B
Anyways, thanks for the input!