Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running test set up throwing error message #10

Closed
shellhatcher opened this issue Feb 25, 2019 · 14 comments
Closed

Running test set up throwing error message #10

shellhatcher opened this issue Feb 25, 2019 · 14 comments
Labels
external-dependency good first issue Good for newcomers question Further information is requested technical

Comments

@shellhatcher
Copy link

shellhatcher commented Feb 25, 2019

Hi,

I tried to run the code given for the test set up purpose using node test/todo-app.test.js
that should return nothing, but I got the following error messages
internal/modules/cjs/loader.js:615
throw err;
^

Error: Cannot find module 'tape'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:613:15)
at Function.Module._load (internal/modules/cjs/loader.js:539:25)
at Module.require (internal/modules/cjs/loader.js:667:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object. (/Users/babydust/Desktop/todolist_mvc/test/todo-app.test.js:1:76)
at Module._compile (internal/modules/cjs/loader.js:738:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:749:10)
at Module.load (internal/modules/cjs/loader.js:630:32)
at tryModuleLoad (internal/modules/cjs/loader.js:570:12)
at Function.Module._load (internal/modules/cjs/loader.js:562:3)

What might cause this problem to occur?
Thank you in advance for your assistance.

@nelsonic
Copy link
Member

nelsonic commented Feb 25, 2019

Hi @shellhatcher, welcome to @dwyl!
Stoked you found our todo-list tutorial.👍
It appears as though you don't have the dependencies installed, specifically tape which runs the tests.
Please Try running nom npm install in your terminal.

@nelsonic nelsonic added good first issue Good for newcomers question Further information is requested external-dependency technical labels Feb 25, 2019
@shellhatcher
Copy link
Author

shellhatcher commented Feb 25, 2019 via email

@shellhatcher
Copy link
Author

shellhatcher commented Feb 25, 2019 via email

@fmoliveira
Copy link

Hi @shellhatcher, it's npm install. Please try running it and let us know. :)

@nelsonic
Copy link
Member

@shellhatcher that was Android auto-correcting "npm" to "nom" ... 🙄
it needs to be npm install as @fmoliveira kindly corrected. 👍

@shellhatcher
Copy link
Author

shellhatcher commented Feb 26, 2019 via email

@fmoliveira
Copy link

@shellhatcher The command npm -v will output the installed version of npm, the Node.js Package Manager itself, not anything related to tape. So, running npm -v isn't sufficient to tell if you've got tape installed.

To check if you've got tape installed in your current repository, check your node_modules folder, that should be in the same level as your package.json file. Does this folder exist? Does a tape folder exist inside it? If yes, then tape is installed, and you shouldn't need to run npm install again.

@shellhatcher
Copy link
Author

shellhatcher commented Feb 26, 2019 via email

@Jbarget
Copy link
Member

Jbarget commented Feb 26, 2019

@shellhatcher the answer is 3.

The 3 files need to be within the directory so that the code has access to the node_modules directory. The node_modules directory contains all the "dependencies" for the project. (If you had a different project, they would likely have different "dependencies" and therefore the contents of the node_modules directory would be different too.)

You can see these in the package.json file under dependencies and devDependencies.
And you can think of the package.json as a whole as the ingredients list for the project.

Questions are fine :) If you have any suggestions for us on how to make the README clearer let us know!

@shellhatcher
Copy link
Author

shellhatcher commented Feb 26, 2019

Thank you very much Justen Barget for the answer.
I did your suggestion and it worked fine now:) -But I changed the name of the files, since the files names asked are all already existed inside the todo-list-javascript-tutorial directory.

In my humble opinion as a total beginner, probably the following could be used to make the README totally beginner friendly:

  1. The HOW? section should be numbered in order, so it will be easy for us to follow along spot at which step we are.
  2. I think putting the seemingly unrelated information in the middle of the HOW? step will cause distraction, for example at the README after the first HOW? section, all of a sudden we are introduced with Elm(ish) ?. I think all of the necessary additional information/ the explanation on a certain buzz words should be group on their own.

Probably that's all for now, since I haven't moved further. Later down the road, if I find something else I will raise an issue and probably I'll be able to give more suggestions seen from newbie point of view.

I do really appreciate great support from all of you guys:)

@nelsonic
Copy link
Member

@shellhatcher thanks for the incredibly valuable feedback! 🎉

@shellhatcher
Copy link
Author

shellhatcher commented Feb 26, 2019 via email

@nelsonic
Copy link
Member

@shellhatcher please confirm if you were able to get the example (and tests) running.
(if you were, please consider commenting and closing this issue, thanks!) ✨

@shellhatcher
Copy link
Author

@nelsonic,
Pardon me for haven't closed the issue yet. I have successfully got the example and tests running since 25 days ago thanks to all of your swift supports:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external-dependency good first issue Good for newcomers question Further information is requested technical
Projects
None yet
Development

No branches or pull requests

4 participants