-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught ReferenceError: FULLTILT is not defined #46
Comments
Hello, If I was given $1 every time I miss something obvious, I'd be a millionaire :) Are you adding manually? or via AMD or Common JS? ...... For production, add the minified complete version of gyronorm.js which is under the <script src="<path_to_js_files>/gyronorm.complete.min.js"></script> If you want to use the unminified version (for instance for development), then you need to add FullTilt manually. <script src="<path_to_js_files>/fulltilt.min.js"></script>
<script src="<path_to_js_files>/gyronorm.js"></script> ..... If you add gyronorm.complete.min.js , FULLTILT should come packaged with it. Cheers, |
Hey @dorukeker, thanks for the response. I installed via npm:
And I'm currently using: But I'm getting: Is this down to a problem with the FULLTILT dependency? |
I run into the same with webpack following this: #30
Will use the minified distributable meanwhile:
|
Fulltilt is no longer MIT license ( adtile/Full-Tilt#19 ). It looks like Adtile is protecting their patents by making it proprietary under CC Non-Commercial License 4.0 ( http://creativecommons.org/licenses/by-nc/4.0/ ). Which makes this library unusable for commercial use. Also, I think the Adtile license should be mentioned here as well? |
Hi there, The full version of Gyronorm contains FullTilt version 0.5.3, which is MIT license. Since it is all MIT, do you stil think there is an issue? @cthorner Cheers, |
I'm also having the same problem (FULLTILT is not defined). Using ES6 import after installing with npm. |
@buesing and others I wont have time to update the module for the next couple of weeks. Is that possible some one from the list pics up and send a PR? I am more than glad to merge :) |
Experiencing the same issue atm while trying to incorporate gyronorm into a React app.
simply adding it as a script to the index.html results in: If I create a simple html site and do a basic script src to 'gyronorm.complete.min.js' everything works, but if I attempted to import via either of those two methods or even simply add it to my index.html page directly it breaks during compile. Anyone have any ideas? |
I'm in the same position as @marcaaron |
I don't have any React experience. So can't really help you out with this unfortunately. Just to give you some context: I build this library years ago to use with an installation. Since then I am almost never working with JS. So not very up-to-date with the (relatively) new frameworks. I keep this thread open and will try to find some one to help out. |
That's cool. |
Hi all, |
Hello All, I had some feedback from others who have experience in React. Below I list what I understand from their feedbacks. Please note that I might not be using the correct terminology. As far as i understand when you add a library via React, it searches for any dependency library in NPM. This specific version of FULLTILT is not available on NPM due to licence issues. Therefore react cannot load that version and gives an error. So for now that is all the info I have. Gyronorm is using FULLTILT library for the maths and calculation of the values that come form the vanilla JS API. The best way would be to re-write that section and remove FULLTILT dependency completely. Though I wont be able to pick this up at least for the coming months. Anyone up for the task? :-) PR's are always welcome. |
I managed to get it working in Vue.js (which uses Webpack to load modules, and should be similar to React or Angular). It is by no means a pretty solution, but it might get others to where they need to go. Step 1Download v0.5.3 of Fulltilt here, since it seems to be the latest version with a license, which allows commercial use. Step 2Remove line 17-22 and 1469-1473 from fulltilt.js, i.e. (function ( window ) {
// Only initialize the FULLTILT API if it is not already attached to the DOM
if ( window.FULLTILT !== undefined && window.FULLTILT !== null ) {
return;
} and ////// Attach FULLTILT to root DOM element //////
window.FULLTILT = FULLTILT;
})( window ); Step 3Attach this to the end of the file: Step 4Change line 112 and 116 in lib/gyronorm.js to: and
Step 5Import FULLTILT and Gyronorm to your project, e.g. like this: import FULLTILT from '../assets/fulltilt.js';
import GyroNorm from 'gyronorm'; Step 6After constructing the Gyronorm object and before initializing it, add Fulltilt to the object like this: var gn = new GyroNorm();
gn.FULLTILT = FULLTILT; That's it. You should be able to work with Gyronorm now. I'm sure there is a smarter way, e.g. by passing Fulltilt to the constructor or, as @dorukeker suggests, to remove the Fulltilt dependency altogether. |
Thanks for the cool fix @jepster-dk ! I found another fix. I just added the
This was enough to mount it to the |
|
The README.md mentions that FullTilt is bundled with gyronorm.js but when running the page (using the default values) I'm getting the error:
"Uncaught ReferenceError: FULLTILT is not defined"
Sorry if I'm missing something obvious. Thanks.
The text was updated successfully, but these errors were encountered: