Module "push" not found.

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Falkyraizu
Prole
Posts: 10
Joined: Sun Mar 22, 2020 9:30 pm

Module "push" not found.

Post by Falkyraizu » Sun Mar 22, 2020 9:35 pm

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?

User avatar
papainoel14
Prole
Posts: 10
Joined: Fri Mar 13, 2020 3:59 pm

Re: Module "push" not found.

Post by papainoel14 » 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 download and require it
Last edited by papainoel14 on Mon Mar 23, 2020 2:16 am, edited 3 times in total.
Ninguem

User avatar
Varkas
Prole
Posts: 32
Joined: Mon Mar 09, 2020 2:26 pm

Re: Module "push" not found.

Post by Varkas » Sun Mar 22, 2020 11:33 pm

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.
In soviet russia, code debugs you.

Falkyraizu
Prole
Posts: 10
Joined: Sun Mar 22, 2020 9:30 pm

Re: Module "push" not found.

Post by Falkyraizu » 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.

User avatar
zorg
Party member
Posts: 2801
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Module "push" not found.

Post by zorg » 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.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.

Falkyraizu
Prole
Posts: 10
Joined: Sun Mar 22, 2020 9:30 pm

Re: Module "push" not found.

Post by Falkyraizu » Mon Mar 23, 2020 2:51 am

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.

Falkyraizu
Prole
Posts: 10
Joined: Sun Mar 22, 2020 9:30 pm

Re: Module "push" not found.

Post by Falkyraizu » Mon Mar 23, 2020 3:39 am

[Content Deleted]
Last edited by Falkyraizu on Mon Mar 23, 2020 4:12 am, edited 1 time in total.

Falkyraizu
Prole
Posts: 10
Joined: Sun Mar 22, 2020 9:30 pm

Re: Module "push" not found.

Post by Falkyraizu » Mon Mar 23, 2020 3:52 am

[Content Deleted]

arquech
Prole
Posts: 2
Joined: Thu Apr 02, 2020 4:42 pm

Re: Module "push" not found.

Post by arquech » Thu Apr 02, 2020 5:15 pm

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

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests