Never ending story

I started over a big surprise for some of you. :laughing:
My problem is this I searched in FreeCodeCamp and found an old one to try.
so I typed it out no problems but Yarn doesn’t work. so I’m reaching out again.

error Couldn't find a package.json file in "D:\\Jamie's Files\\calculator\\Mycalculator"
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
PS D:\Jamie's Files\calculator\Mycalculator> 

Help, please? If you don’t mind.

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36 Edg/85.0.564.41.

Challenge: Build a JavaScript Calculator

Link to the challenge:

Heya~!

I’m a little confused here. The challenge you linked is the JavaScript Calculator, which is a client-side static application.

A package.json is generally used when building a full-stack application (as it contains the needed information for node or yarn to run the server. Can you provide a bit more detail on what your objective is? :slight_smile:

EDIT: I was way off base here.

Can you link to the project you found? Does it have a package.json file or what?

@nhcarrigan Not sure what you mean, any project that uses npm packages will have a package.json file.

This is true - though in my (admittedly limited) experience, npm packages generally aren’t used in static front-end only applications. Right? :thinking:

Static and front-end have nothing to do with it.

If you add anything as a package like jQuery, some utility library like say uuid, or if your application is using a front-end framework/library like React, Vue, Svelte, etc. (which a lot of the calc project do) it will have a package.json file.

1 Like

Ah that’s true. I hadn’t thought about React. :sweat_smile:

Thanks for the clarification! I should probably get more coffee. :stuck_out_tongue:

2 Likes

I m new but i thought static is not in use. This project is met to be used. I use react for the hooks, i dont know how to use PHP and The one i found in free code camp files has a PHP for the CSS. i dont plan to use the styles at all. So is his CSS the problem cause i dont have acess to his file are something.

My calculartor isnt in Github yet.

@royalgreen50 Static usually just means client-side.

Not sure what project you are talking about with the PHP, but the React one you linked to should work just fine.

So you cloned the repo into the Mycalculator folder and then you ran yarn install from inside the folder with the package.json inside it? That should work.

I would however suggest you use a folder on your drive without spaces in it. I’m not saying it is related just that it is better/safer (e.g. D:\webdev\calculator\Mycalculator).