I cloned this repo, what's next?
ryantmurphy (3)

Hello! I cloned this repo, but now I'm stuck. The readme assumes I will be installing Node.js locally, though I'd like to make it work here in Repl.it. I've tried several things that seem to make sense but it does not seem to produce the demo app shown in the README. Help! Thanks.

You are viewing a single comment. View All
rediar (90)

try using the package for ynab instead

ryantmurphy (3)

@rediar Thanks for the response, but I'm super new to all of this.. can you go into more detail please?

rediar (90)

@ryantmurphy No problem! Do you seethe cube on the sidebar to the left? click on that, and search up for ynab.
please upvote or mark as answeered if this was helpful

rediar (90)

@ryantmurphy it should say
ynab
YNAB API Javascript (Node) Library
just click the plus and then it will be installed!

ryantmurphy (3)

@rediar okay awesome! Is doing this process equivalent to running "npm install ynab" on local?

rediar (90)

@ryantmurphy exactly! you might want to make a new repl and do it on there, if you want to start from scratch.

ryantmurphy (3)

@rediar Okay, I completed that and tried running it again. Here's what I got:

node v10.16.0
## YNAB API Starter Kit ##
  Copying files...
  Installing dependencies...
Error: spawn ENOTDIR
    at ChildProcess.spawn (internal/child_process.js:366:11)
    at spawn (child_process.js:551:9)
    at installDeps (/home/runner/index.js:49:13)
    at /home/runner/index.js:24:3
    at next (/home/runner/index.js:36:7)
    at /home/runner/node_modules/cpr/lib/index.js:312:20
    at callback (/home/runner/node_modules/graceful-fs/polyfills.js:289:20)

Any ideas? Google doesn't seem to reveal anything specific to repl.it, so not sure how relevant those solutions are.

More specifically, I copied everything from start.js to index.js (was this correct?) and within index.js, I added this line: const ynab = require("ynab"); This was from the ynab package docs.

rediar (90)

@ryantmurphy well, no you see, if you clone the repository, usually that's to interact with it not to copy it, I'm not sure if this is clear, but if you know git clone, it's kinda the equivalent of that. if you paste it from start.js to index.js you're not basically just making two files with the same content, but one that executes. Try forking it, (with the pasted index.js) deleting the bin folder, and it should execute.
update
still doesn't work, found a link that might help https://nodejs.org/api/child_process.html
ok so I'm pretty sure the installation worked, so it's probably an error with the code that you cloned.

ryantmurphy (3)

@rediar okay I will read this, thank you!!