Skip to content
Sign UpLog In
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
3

Unable to initialize cargo package

kriv02
kriv02

I am unable to use cargo to create a new project. When I execute 'cargo new guessinggame', it fails, and returns 'Failed to create package "guessinggame" at "home/runner/guessinggame"

Caused by:
could not determine the current user, please set $USER'
This also happens when I run 'cargo init' on an already extant directory. Does anybody know how to fix this?

3 years ago

Voters

Comments

TopNew
4
Highwayman
Highwayman

because you can’t access home/runner/* because we are all confined to home/runner/repl_name in terms of read / write access.

3 years ago
1
BlueMoon18
BlueMoon18

If you're moving across provinces from Canada to the U.S. then you'll need moving services specific to a regional cross-border and long-distance move. Look for a company like http://bestmoverscalgary.ca/ with experience in these areas so your moving truck doesn't wind up stuck in customs.

4 months ago
1
ArchieMaclean
ArchieMaclean

Hi there!
Because of the inflexibility of language repls (for example, each Rust repl must have a main.rs in the repl directory at the top level), I tried this with a Polygott repl, and it seems to work.

The repl is here: https://repl.it/@ArchieMaclean/TestingStuff
Dependencies all work as well. Feel free to fork it, or just create a polygott repl at https://repl.it/languages/polygott and copy in the Makefile code (changing it to fit your need).

Please mark this as the answer if it solves your problem :)

3 years ago
1
Highwayman
Highwayman

Don’t use cargo on repl.it, use repl.it’s upm. (Meaning don’t install packages, they’re automatically installed for you) I generally find it’s just best to go with the flow. Also the reason you can’t install is

3 years ago
1
kriv02
kriv02

@Highwayman
How do you have repl.it do that then? Just putting the import command in the file doesn't work, and I can't seem to find anything else on how to do it.

3 years ago
1
Highwayman
Highwayman

@kriv02
it doesn’t say anything in the docs? Here, let me check them..

3 years ago
1
Highwayman
Highwayman

@kriv02
yeah it doesn’t say anything about r in the docs either.. hm. How about we take a stab at that “$USER” problem first. Might as well I guess. I can try and look a little closer later on if we are still not getting anything.

3 years ago
1
Highwayman
Highwayman

@kriv02
ok so to fix the user thing, I think you can just configure the run button to run the r program as normal with cargo or however you do it, but also adding before that the command export USER="/home/runner/repl_name" where repl_name in this case is Testingstuff. To configure the run button, you must make a file called .replit and then type in that file run="command" where command is the things you want it to do on run.

3 years ago
1
kriv02
kriv02

@Highwayman
That didn't work. The export command parses, but then cargo sends the same error message.

3 years ago
1
Highwayman
Highwayman

@kriv02
dam. maybe I got the placement wrong? Try ~/Testingstuff. Or maybe it’s something else..

3 years ago
Load more