-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
jsep is undefined fix #5601
jsep is undefined fix #5601
Conversation
@ggetz please update CHANGES.md. @lucastheisen can you confirm that this fixes your issue? |
This fixes the Node issues I was having. 👍 |
Updated CHANGES.md |
My test would be using the example that @ggetz mentioned she confirmed this fix with. However, I would be happy to also test against my real project if there is a relatively straightforward path to doing so... Do you guys have a CI build that would allow me to point to this fix? Or do I need to build from from the pull request source branch and build myself? I'll do the legwork, just curious as to the best approach... |
As far as I can tell, the jsep stuff gets embedded into the cesium js files during the build (in the build folder there is no jsep under ThirdParty). This means i cant just swap out a file to test, so I need to build. However, my corporate environment is a major pain in the neck... the |
Okay, after an RTFM moment, I checked out the @ggetz branch, then ran
Which appears to have reared its ugly head again in 1.34. Guess I will wait for a patch for that and try again... Thanks for getting this one sorted out! |
We should avoid directly modifying third party files. It can be a pain when we go to update that file in the future. @mramato do you have any suggestions for working around this in a different way? |
Thanks for testing this out @lucastheisen, hopefully we can get #5417 sorted soon. @hpinkos I beleive @lilleyse said we already have modified this file, if that changes anything at all. |
Would a better fix maybe be to define |
I think the correct fix is to put all of the old code back and only call |
Updated |
The recent changes don't work from the Node side because
|
@mramato Is |
I am preparing a gltf-pipeline release with |
Thanks, I can reproduce without the pack and install parts by just requiring in I see what the problem is:
|
Source/ThirdParty/jsep.js
Outdated
@@ -680,5 +680,9 @@ define(function() { | |||
} | |||
}(this)); | |||
|
|||
return jsep.noConflict(); | |||
if (typeof jsep.noConflict === 'function') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change this to if (typeof jsep !== 'undefined') {
and remove the last return statement on line 687. I think that will finally do it. Add a comment to the if that mentions that jsep
only exists when running in a browser, not Node.
What's even weirder is that in some cases, When we to ES6, we'll have to revisit our strategy for how we wrap/use third party libraries. |
Doc is failing, which is why travis is failing, but it doesn't appear to be related to this branch. @lilleyse can you test this out. Thanks. |
I tested with webpack and it works. I'm not sure why the build is failing on makeZipFile though, the command runs without error locally. |
The latest changes work for me. |
Thanks @ggetz! |
Fixes #5593
Fixes the jsep is undefined error that was occurring when using webpack. Tested using the configuration @lucastheisen provided in #5593
@lilleyse Can you review please?