I’m using StubCollections for some unit tests. The package works successfully while running the tests in my console. However, I cannot get them to run in my browser because of some syntax errors in the source file itself.
I get Uncaught SyntaxError: Unexpected token '*'
The error is at the end of the file for a function that looks to have been commented out.
function get(object, pathI
* //tOg.get(object, [gglobal;
/*ues.
0].b.c(
I added an Issue to the package’s repo but haven’t heard back yet.
Since this is just used for running tests in dev mode, I was hoping I could get into the source file itself and just delete that function. I did some poking around and could not find the actual file.
I think you can create a packages folder under the root of your project. Inside it you can checkout the package you want to change from github. Your ‘local’ version will take precedence over the installed one.
It does seem like a build error. I’m noticing the actual file contains over 5000lines. But the actual StubCollections segment ends around Line137.Then there’s a lot of lines for what looks like StubCollections’ dependencies.
https://pastebin.com/W18dmUq1 is a link to the source. Any idea what’s going on and what could’ve caused this? Thanks!
I just checked in my project and lodash.get is included correctly
What version of StubCollections are you using?
I’m using 1.0.9
Might be worth clearing Meteor’s global package cache by deleting the folder at ~/.meteor/packages/ and ~/.meteor/pacakge-metadata.
Then do a meteor reset and run again
That will force meteor to download fresh copies of every package
So what exactly is that big 5k Line file? Is it the source for StubCollection, but then also its dependencies…hence the lodash, sinon, etc…
I’m also using version 1.0.9.
I’m using Windows and deleting ~/.meteor/packages/ just cleared my whole packages file and ~/.meteor/pacakge-metadata didn’t even exist. However, upon clearing ~/.meteor/packages/ and running meteor reset I was unable to start the app. I had to put my packages in just to get it to run again.
I then switched to another branch that didn’t have StubCollections in my packages and re-installed it. Upon reinstalling I still got the same error. Seems like something logistical here, I’ll clone another machine, rebuild, and see if it works from there
I deleted everything in .meteor but now get 'meteor' is not recognized as an internal or external command, operable program or batch file. everytime I try to run a meteor command. Friggin windows.
Any idea what would’ve caused this, I thought I deleted just the cache? Seems the bin must’ve been in there too. Looks like I might have to re-install