trr266 / trer

Template for reproducible empirical research
MIT License
2 stars 4 forks source link

make: *** No targets specified and no makefile found. Stop. #2

Closed Bimsayol closed 3 years ago

Bimsayol commented 3 years ago

makefile.docx Hi,

when I clicked on 'Build All' I got the message below:

make: *** No targets specified and no makefile found. Stop.

Exited with status 2.

Any idea on how to solve this?

Is that the rigth 'makefile' in the attached document?

Thank you

joachim-gassen commented 3 years ago

Hi there!

Uups. I almost overlooked the clipping in the attached word doc. Can you include the screen shot directly the next time? Thanks. Also, copying the full error message helps. What sounds alien to you might be informative to others.

You still have problems with your network path and your command shell on Windows. It does not seem to operate on UNC paths. The simplest way out would be to move the whole "accruals" folder to a local folder on your hard disk and to see whether this helps.

Cheers, Joachim

Bimsayol commented 3 years ago

I have moved the file to desktop to solve the path issue but when i click on build all i still get error message.

ERROR: The build directory does not contain a Makefile so the target cannot be built.

Build directory: C:/Users/boyinlol/Desktop/Github

joachim-gassen commented 3 years ago

Hi there. This looks as if you are in the wrong build directory. Is C:/Users/boyinlol/Desktop/Github really the directory where you have stored the files from the repository? It looks as if you had a directory accruals before. The build directory needs to point to where the 'Makefile' of the project is.

In R/RStudio, you can set your current working directory either by using the setwd() command from within the console or by navigating to the correct directory in the Files tab and then selecting 'More/Set as Working Directory'. By default, the build tools will look for the Makefile in your working directory.

Bimsayol commented 3 years ago

Hi, thanks for the reply. Initially this was the error message:

'\lipasto\kotidir01$\boyinlol\My Documents\Github\accruals' CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory. make: *** No targets specified and no makefile found. Stop.

Exited with status 2.

so, I moved the github folder to my desktop that is why I thought C:/Users/boyinlol/Desktop/Github is my new directory. Now, it seems that it has found the 'Makefile' but i still get error message below:

Rscript --encoding=UTF-8 code/R/pull_wrds_data.R Error in library(RPostgres) : there is no package called 'RPostgres' Execution halted make: *** [Makefile:40: data/pulled/cstat_us_sample.rds] Error 1

Exited with status 2.

joachim-gassen commented 3 years ago

Great. You are making progress.

Here, the error message gives you a relatively precise hint about what is going wrong. You do not have the package RPostgres installed that is required to access the WRDS server (you are using the treat repo and not the trer repo, right. You need to install several packages prior to running the code. Have you read and followed the README of the repository?

Anyway, I am closing this issue as the above is (a) no longer related to the Make process and (b) related to another repository (http://github.com/trr266/treat). Feel free to open a new issue there if you are still stuck after reading the README.