Https://www.codecademy.com/paths/web-development/tracks/web-dev-js-arrays-loops-objects/modules/pjs-javascript-capstone/projects/lodash

I am having trouble with step 1 and step 2 on the recreating lodash library project. I am struggling step one and step 2. I am following the step by step video exactly how the lady does it. yet I still get a “error: _ undefined”

const _ ={};




// Do not write or modify code below this line.
module.exports = _;

https://www.codecademy.com/paths/web-development/tracks/web-dev-js-arrays-loops-objects/modules/pjs-javascript-capstone/projects/lodash

Is it a console error or an error in the LE?

in my terminal(bash) i am suppose to type in node _.js to get access of the file. instead I get a error line number 7 is not defined. I followed the same exact step as the lady in the step by step video and she got the results desired. same exact code so I am confused now.

Did you try,

node test/_.js

?

Correction. I just read the second step and it does indeed suggest that,

node _.js

should run, and for me it does, though nothing comes up since it is just an object definition at this point. The test is,

node test/lodash.js

Just tried it threw an error, but I got it to work. I just refreshed the page and type it $ node _.js it didnt work. I opened a new tab or terminal and odd enough it worked.

1 Like

I trust you did not actually type, $ since that is the bash prompt.

1 Like

when you typed:

const _ = {};

the first time, did you click the Save button at the bottom of the editor before trying to run it in the terminal?

2 Likes