Page 1 of 1

Module "push" not found.

Posted: Sun Mar 22, 2020 9:35 pm
by Falkyraizu
Hey, quick question. How do I fix the error:
Module "push" not found.
I was following the CS50 course when it has a line that said:

Code: Select all

push = require 'push'
I type this code in, and my program stops working with a bunch of errors with messages such as "push not found", "no file push in love paths", etc. How do I fix this?

Re: Module "push" not found.

Posted: Sun Mar 22, 2020 10:46 pm
by papainoel14
he was probably importing a library.
Can you tell what the push is for?
I recommend taking a look at the libraries he is using in the project.

@edit
I was able to find this one: https://github.com/Ulydev/push
try to download and require it

Re: Module "push" not found.

Posted: Sun Mar 22, 2020 11:33 pm
by Varkas
Here is a description of what "require" does:

https://www.lua.org/pil/8.1.html

So to fix your error, either make sure a file "push" or "push.lua" is present in the search path, or change the path to include the location of the file.

Re: Module "push" not found.

Posted: Mon Mar 23, 2020 12:15 am
by Falkyraizu
papainoel14 wrote: Sun Mar 22, 2020 10:46 pm he was probably importing a library.
Can you tell what the push is for?
I recommend taking a look at the libraries he is using in the project.

@edit
I was able to find this one: https://github.com/Ulydev/push
try to require it
I was going off the assumption that 'push' is a default package that is usable. The tutorial said nothing about "installing the push library" so I was assuming that it was there by default. Do I have to install push, because it seems as many games uses the push library, and none of them had to import it manually.

Re: Module "push" not found.

Posted: Mon Mar 23, 2020 12:24 am
by zorg
Falkyraizu wrote: Mon Mar 23, 2020 12:15 am
papainoel14 wrote: Sun Mar 22, 2020 10:46 pm he was probably importing a library.
Can you tell what the push is for?
I recommend taking a look at the libraries he is using in the project.

@edit
I was able to find this one: https://github.com/Ulydev/push
try to require it
I was going off the assumption that 'push' is a default package that is usable. The tutorial said nothing about "installing the push library" so I was assuming that it was there by default. Do I have to install push, because it seems as many games uses the push library, and none of them had to import it manually.
What CS50 course are we talking about exactly?
And no, there are no default packages included with löve that aren't the modules you can find on the wiki (utf-8, socket and (lua-)enet notwithstanding); everything else is a library you need to include.

And no, many games also had to import it manually.

Re: Module "push" not found.

Posted: Mon Mar 23, 2020 2:51 am
by Falkyraizu
zorg wrote: Mon Mar 23, 2020 12:24 am
Falkyraizu wrote: Mon Mar 23, 2020 12:15 am
papainoel14 wrote: Sun Mar 22, 2020 10:46 pm he was probably importing a library.
Can you tell what the push is for?
I recommend taking a look at the libraries he is using in the project.

@edit
I was able to find this one: https://github.com/Ulydev/push
try to require it
I was going off the assumption that 'push' is a default package that is usable. The tutorial said nothing about "installing the push library" so I was assuming that it was there by default. Do I have to install push, because it seems as many games uses the push library, and none of them had to import it manually.
What CS50 course are we talking about exactly?
And no, there are no default packages included with löve that aren't the modules you can find on the wiki (utf-8, socket and (lua-)enet notwithstanding); everything else is a library you need to include.

And no, many games also had to import it manually.
This course: https://www.youtube.com/watch?v=GfwpRU0cT10
(if your interested start watching at 22:15)
Anyways, thanks for the explaination. It all makes sense now. I have to download the modules before using the 'require' command. Thanks for your help! :) I will tell you if anything goes wrong.

Re: Module "push" not found.

Posted: Mon Mar 23, 2020 3:39 am
by Falkyraizu
[Content Deleted]

Re: Module "push" not found.

Posted: Mon Mar 23, 2020 3:52 am
by Falkyraizu
[Content Deleted]

Re: Module "push" not found.

Posted: Thu Apr 02, 2020 5:15 pm
by arquech
How did you install the library? I started the same course of cs50 and download the link that it put but I don't know how to make it recognize me

Re: Module "push" not found.

Posted: Sun Apr 05, 2020 8:42 pm
by tobiasvl
The simplest way is to download it and put it in your game folder.