Comments (11)
@Sharl212 @Swapnilchavan18 Based on your description of the problem I think the issue might be that each call to componentWillMount()
defines a LoadJS bundle but LoadJS throws an error when you try to reuse a previously used bundle name. Here's an example that highlights this condition:
https://jsfiddle.net/muicss/2d9ryjfp/
In your code, are you defining a bundle name when you call loadjs()
?
from loadjs.
What's the error you're getting? Also, which OS/Browser are you using?
from loadjs.
I am using chrome/windows 10, file loads on first load but when navigated back to same route where I am loading file, I get error "Uncaught (in promise) LoadJS" and js file does not load.
I think it happens because file has to load from cache.
from loadjs.
Can you share code to re-create the error on JSFiddle or CodePen? By "navigating back" do you mean hitting the back button?
from loadjs.
Its single page application , I mean without refresh.
from loadjs.
Can you share code to reproduce the error? Does the fuploader.js
file matter or are you getting the same error with other files?
I need more information to be able to debug the problem or recommend a work-around.
from loadjs.
Is there anything that I have to do in componentWillUnmount to load files when there is not a refresh between pages i.e for single page app
from loadjs.
from loadjs.
ok Thanks . give me some time, I am using that in my personal project, I will create fiddle
from loadjs.
got the same exact error when loading js
files on componentWillMount
, it works the first time the component mounts after remounting again , it throws Uncaught (in promise) LoadJS --- asyncToGenerator.js:6
in the console
.
the asyncToGenerator.js
:
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error); // error is thrown by this
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
from loadjs.
@Sharl212 Thanks for letting us know. Can you share some example code that reproduces the problem?
from loadjs.
Related Issues (20)
- Announcement: New version with support for Promises and an Edge CSS onerror bugfix HOT 1
- Update comments in src to clarify arguments to loadJs HOT 1
- Custom script attributes HOT 3
- Ability to insert elements after or before certain element HOT 2
- Image loading and error handling HOT 2
- Support "defer" as well as "async"? HOT 6
- query args cause issues with native file type detection HOT 5
- Idempotent request option HOT 5
- Can not detect image if url has ?=rand123456 HOT 1
- Announcement: New version with support for image/css urls with query arguments and anchor tags
- Action required: Greenkeeper could not be activated 🚨
- How to Solve the Problem of Repeated Loading of Scripts HOT 3
- Is it possible to load JSON? HOT 2
- Stylesheets not loading in ie11 HOT 4
- Using loadjs in a Vanilla project: require is not defined error HOT 2
- CSS order HOT 2
- Security policy questions HOT 3
- Old browsers (Opera12) can't use document.head HOT 3
- Success/Error callbacks never called when the script element has the "nomodule" attribute. HOT 15
- More details than "path not found" HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from loadjs.