Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Databases Mongo Basics Understanding MongoDB Store Your Blog In Mongo

Ivan Sardelić
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Ivan Sardelić
Full Stack JavaScript Techdegree Graduate 18,248 Points

load() function isn't working on Windows

My seed.js folder is in the same directory as the bin folder. I am assured of this when i run ls(). However when I run the load command, i get this:

load('./seed.js') 2018-11-08T12:44:00.070+0100 E QUERY [js] SyntaxError: illegal character @(shell):1:6

I have tried using double quotation marks also, but I get the same thing.

Any ideas?

2 Answers

Kevin S
seal-mask
.a{fill-rule:evenodd;}techdegree
Kevin S
Data Analysis Techdegree Student 15,862 Points

Hi Ivan,

My load() function was not working either. It turns out that I named my db I found this post that fixed it, however.

https://teamtreehouse.com/community/seedjs-loading-error

When I followed the video to create the db, I created it as mongobasics instead of mongoBasics like it is in the seed file. I changed the seed file to match my database, and it worked!

Hope this helps