Failed to load resource: the server responded with a status of 500 (Internal Server Error) into init.js

Hi,
I did everything described in this link:
https://preview.keenthemes.com/metronic8/laravel/documentation/getting-started/build?demo=demo1

I can log in to the system and it's working but my browser console is showing some errors like:

Failed to load resource: the server responded with a status of 500 (Internal Server Error) in the init.js file. and my init.js file is blank.

and also I tried to use flatpickr for the show calendar in my input field but it's not working too.
I used this code:
$("#kt_datepicker_1").flatpickr();

I run 'npm run dev' but it still shows:


nid-verify.js?ab44:4 Uncaught TypeError: $(...).flatpickr is not a function
at eval (nid-verify.js?ab44:4:29)
at eval (nid-verify.js?ab44:16:2)
at ./resources/assets/demo1/js/custom/nid-verify.js (nid-verify.js:19:1)
at nid-verify.js:30:82
at nid-verify.js:32:12

So I am thinking because of init.js others are not working. Please guide me if I am missing something to configure.

Thanks

Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (5)

Hi Razib Ahmed,

Sorry for the delay. Here is the workaround. Could you please add this _init.js file? Please the file inside resources/assets/core/js/components/_init.js

https://gist.github.com/KeenthemesHub/8adc844ac61d355c45b4454147e932e2

We will fix it as soon as possible.

Thanks

Hi Faizal,

I did as you mentioned, I added the code from git to the _init.js file

Git URL: https://gist.github.com/KeenthemesHub/8adc844ac61d355c45b4454147e932e2

_init.js file location: resources/assets/core/js/components/_init.js

But still, the 500 issues are there showing:

Loading failed for the with source “http://127.0.0.1:8000/demo1/js/init.js”.


GET: http://127.0.0.1:8000/demo1/js/init.js
Status: 500 Internal Server Error
Version: HTTP/1.1
Transferred: 1.02 MB (1.02 MB size)
Referrer Policy: strict-origin-when-cross-origin

Also, you can see the error details in this screenshot:
https://www.screencast.com/t/nRf8JUx38H

Hi Razib,

Could you please download the latest version from ThemeForest? We just released a new update yesterday. Hope it can be resolved.

Thanks

Hi Faizal,

Thanks for the new release 8.1.6. My init.js issue is fixed under this version.

Thanks

Hi Razib Ahmed,

Sorry for the inconvenience. Glad it has been resolved.

Thanks

Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(