Coder Social home page Coder Social logo

Comments (18)

rconstantine avatar rconstantine commented on September 3, 2024

I'm seeing the same issue. Will try to downgrade to 2.4.0.

from jsreport-studio.

pofider avatar pofider commented on September 3, 2024

My apologies. This problem was introduced in the 2.5.0.
I've fixed it now, so it will be included in the upcoming release.

from jsreport-studio.

rconstantine avatar rconstantine commented on September 3, 2024

OK. Thanks for the effort. I updated to latest jsreport (npm install --save jsreport@latest), and although the 2.5.1 version (of jsreport-studio) did come down with it, it's still throwing the same error. I realize I didn't mention before that the stand-alone server was working fine and this error only showed up when I attempted to integrate into an existing Express app. Then again, I see you commented on my forum thread, so you probably already know that.

I think I'll pull down 2.4 and run a compare.

from jsreport-studio.

rconstantine avatar rconstantine commented on September 3, 2024

Hmm. I see the line you added. Seems like it should work, but for some reason, when I inspect the file's header using the Network tab of the developer tools in chrome, it's still coming across as text/html. I have performed a hard refresh, so it shouldn't be using cached files. I'll look to see if I can tell why.

from jsreport-studio.

rconstantine avatar rconstantine commented on September 3, 2024

How about instead of res.send, you use res.jsonp? I think you're sending jsonp, aren't you? http://expressjs.com/en/api.html#res.jsonp

from jsreport-studio.

rconstantine avatar rconstantine commented on September 3, 2024

My bad. I'm a moron. jsreport@latest doesn't include the latest jsreport-studio. Updating separately (jsreport-studio@latest) doesn't seem to pull that change either, which is why nothing is different. How do I pull master of jsreport-studio instead of 2.5.1? I'll go google that.

from jsreport-studio.

pofider avatar pofider commented on September 3, 2024

Install as github depencency

npm i jsreport/jsreport-studio

from jsreport-studio.

rconstantine avatar rconstantine commented on September 3, 2024

Crud. That worked in terms of getting the file updated in my project's node_modules folder, and when I open the studio.js file I see the change, but running the app I still get the same error.

I manually changed the send to res.jsonp(clientStudioExtensionsJsContent) and now that error goes away! So success there!

However, the other two errors remain (which weren't mentioned above). They say: "Error: Loading chunk 1 failed" and "Uncaught (in promise) Error: Loading chunk 1 failed"

from jsreport-studio.

rconstantine avatar rconstantine commented on September 3, 2024

Here's the first one: Error: Loading chunk 1 failed.
(missing: https://pharmacyinformatics.local:3000/reporting/studio/assets/studio-extensions.client.js)
at Function.i.e (client.js?e74d863926ba6fb1f82a:1)
at client.js?e74d863926ba6fb1f82a:72
at D.n._execute (client.js?e74d863926ba6fb1f82a:6)
at D._resolveFromExecutor (client.js?e74d863926ba6fb1f82a:6)
at new D (client.js?e74d863926ba6fb1f82a:6)
at t.default (client.js?e74d863926ba6fb1f82a:72)
at client.js?e74d863926ba6fb1f82a:32
at w (client.js?e74d863926ba6fb1f82a:32)
at Generator._invoke (client.js?e74d863926ba6fb1f82a:32)
at Generator.e. [as next] (client.js?e74d863926ba6fb1f82a:32)
at o (client.js?e74d863926ba6fb1f82a:6)
at client.js?e74d863926ba6fb1f82a:6
at new Promise ()
at new t (client.js?e74d863926ba6fb1f82a:6)
at client.js?e74d863926ba6fb1f82a:6
at client.js?e74d863926ba6fb1f82a:32

from jsreport-studio.

rconstantine avatar rconstantine commented on September 3, 2024

I can't tell why it says that file is missing. It shows as loaded now, on the Network tab of dev tools. And clicking on the link for it shows its contents! Perhaps there is an order of operations issue where the chunks are trying to be loaded before the file has been downloaded? I compared 2.4.0 to the latest and I'm unfamiliar with what you're trying to do with webpack, so I'm not much help.

from jsreport-studio.

rconstantine avatar rconstantine commented on September 3, 2024

Should I open a new issue for the above error instead of continuing this one?

from jsreport-studio.

rconstantine avatar rconstantine commented on September 3, 2024

Hmm. Not sure if this pertains: webpack/webpack#7502

from jsreport-studio.

rconstantine avatar rconstantine commented on September 3, 2024

Is it an issue that the file is loaded last? See image.

ScreenHunter_491 Jun  12 10 48

from jsreport-studio.

rconstantine avatar rconstantine commented on September 3, 2024

I rolled back to jsreport 2.4.0 and all is well. I'll wait for a fix before trying to upgrade. Thanks for looking into this. It's appreciated.

from jsreport-studio.

bjrmatos avatar bjrmatos commented on September 3, 2024

related to https://forum.jsreport.net/topic/1090/integration-into-existing-express-application-error/3

i will try to find the time to check the express integration in your case. thanks

from jsreport-studio.

c-andrey avatar c-andrey commented on September 3, 2024

still having this problem on 3.1, can someone enlight-me?

from jsreport-studio.

bjrmatos avatar bjrmatos commented on September 3, 2024

hi @c-andrey, it is likely an issue with the way you have integrated jsreport with your express app, there is no way we can know what can be wrong if you don't share how your app is setup.

i suggest you create a new issue, and provide more details, example code, or even a small repository that show how the integration is not working.

try to follow the basic integration here, and from there start to add things until you can reproduce your problem.

from jsreport-studio.

c-andrey avatar c-andrey commented on September 3, 2024

actually, its exactly what you said, the app integrated that was causing the conflict in the routes for the express

from jsreport-studio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.