[Solved] Fastclick package breaks app

Update: the problem even persists if you update the repo to 1.3. Doesn’t seem to be related to 1.2.1.

That repo seems just fine unfortunately:

Strange. On my machine, Firefox won’t show anything if fastclick is included. This is reproducible.

I see: Welcome to Meteor!

Updated with a test on 1.3 also, cannot reproduce the issue in any case.

I am not sure why you did with your install but since you have been here before with such questions a full fresh install (yes it’s unique on OSX) might be an option to save you headaches now and in the future.

You mean a fresh install of OS X? That’s not really possible. But I reset Meteor completely and re-installed it. What else could I do besides re-installing OS X? Re-install Node?

I only had the situation that I needed to re-install Meteor once: when I updated an Meteor 1.1 app to Meteor 1.2, which also broke the app completely (and even the Meteor tools were affected somehow, so other apps were broken, too). This time, I did not even update anything to 1.3 manually, not even a single app. How can it be that an app just breaks?! Is Meteor doing some magic minor updates in the background?!

BTW: There seems to be at least one other guy affected by this, though he also reports the problem to occur on Chrome.

I remembered this one where you also had magical issues with configs. I really have no idea but you should at least try to build a virtual machine or another device so you can test whether an issue depends on your system or not.

And to be clear: I am not sure it’s a bug in your system, it just surprises me that you had issues more with this kind of things.

Yep, this was the problem I was facing when upgrading one (!) app to 1.2. Now I did not even do anything, besides doing a rebuild of an 1.2 app. Will try a re-install of Node.js and an npm update plus another Meteor re-install now. Maybe this helps.

Maybe some piece of software is installed globally instead of locally which keeps bugging?

What kind of software are you thinking of? Besides: I did not install any software when the problem suddenly appeared. It came literally out of nowhere, after a rebuild when I was changing some code. And it persisted even after I reverted everything to a previous state.

I now re-installed Node and removed all unwanted npm packages. I even re-installed Meteor again and let it re-download all community packages. But still no luck. The problem persists.

[quote=“waldgeist, post:15, topic:20543, full:true”]
What kind of software are you thinking of? Besides: I did not install any software when the problem suddenly appeared. It came literally out of nowhere, after a rebuild when I was changing some code. And it persisted even after I reverted everything to a previous state.
[/quote]Is was thinking about some piece of software which Meteor uses. They seem to integrate most software though.

It came literally out of nowhere

Well, I am quite sure Meteor does something when a new version is online available. I don’t know the internals of that. So out of nowhere I think is not right. It’s not intended by you but might have triggered it by just running Meteor.

Ah, ok.

This could pretty much be the case. Though it’s quite strange. I now gave up to hunt down the root cause, I guess I’ll have to wait for MDG’s official response on my issue.

yes sorry have no idea how you can find the issue. I know you can run Meteor in debug mode but I suspect it won’t help much in finding because it’s not crashing.

Edit: Final idea: Could you post the client build output (so HTML + JS + CSS) from both? If you get a Javascript error something has to be different. Maybe a diff of the output on the 2 machines will show it?

1 Like

Well, I can see exactly which line fails. It’s in packages/global-imports.js, and it’s the line where fastclick is referenced:

/* Imports for global scope */
check = Package.check.check;
Match = Package.check.Match;
ECMAScript = Package.ecmascript.ECMAScript;
FastClick = Package.fastclick.FastClick;
...

It’s this last line that’s failing because the Package dictionary does not contain an entry for fastclick. I can see this if I inspect the console. This happens although the package’s JS file is being included in the HTML code and also registers itself to the Package dictionary.

I now also checked the debugger: Although the fastclick.js is included via HTML (and points to the right location, I can download it with the URL), the browser does not seem to load it. If I search in the FF debugger for “fastclick”, I don’t get a result, whereas for other packages the search works. I also can’t find it in the debugger’s source files list.

I hacked into the fastclick.js file in the packages folder and replaced its content by a console.log statement. However, this code won’t be executed, although the same approach works for every other package I tried out. Seems as if FF just refuses to load this particular js file. I can’t see any reason why in the HTML code, though, as Meteor references it just as the others. Very, very strange. I even checked the chmod settings of this file, which are fine.

BTW: The app works fine if it is built with the --production flag. So it seems to be a build problem.

I don’t have fast click in that list also, I do have: https://atmospherejs.com/meteor/mobile-experience in the list. Not sure if every package is listed there (since not all become global).

Here you can see how it’s added to your project:

I am also getting this error. With fastclick in my packages everything is undefined (Meteor, Template, Tracker, etc…) when meteor builds. Any progress on fixing this issue?

Updating to 1.3 added the mobile-experience package… And that includes fast click. I had the standalone fastclick loading before that and the holy nuke of an error got thrown. Removing it and replacing it with mobile-experience should do the trick.