Local Crayons installation for Custom App

Hello,

I am currently trying to build a fullpage custom app for Freshservice. For the index.html file of this app I would like to use Freshworks Crayons. According to the documentation I should be able to locally install the package and reference it in my index.html. Here the head of my html file:

<head>
  <title>Test</title>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <script src="lib/node_modules/@freshworks/crayons/dist/crayons/crayons.js"></script>
  <link rel="stylesheet" src="lib/node_modules/@freshworks/crayons/css/crayons-min.css" />
</head>

Although this does technically work, my page using 4 Crayon elements is taking over a minute to actually load when serving the index.html using fdk run. Additonally I see the following error message in the console logs (where fdk is currently running)

BadRequestError: request aborted
    at IncomingMessage.onAborted (C:\Users\************\AppData\Roaming\npm\node_modules\fdk\node_modules\raw-body\index.js:238:10)
    at IncomingMessage.emit (node:events:517:28)
    at IncomingMessage._destroy (node:_http_incoming:224:10)
    at _destroy (node:internal/streams/destroy:109:10)
    at IncomingMessage.destroy (node:internal/streams/destroy:71:5)
    at abortIncoming (node:_http_server:781:9)
    at socketOnClose (node:_http_server:775:3)
    at Socket.emit (node:events:529:35)
    at TCP.<anonymous> (node:net:350:12)

Hey @chrism,
If you aren’t using any of the JS frameworks, you can try the CDN approach to import Crayons into the app’s index.html.

Thanks for your reply. I am aware of the CDN option, as I used this before in my custom apps.
Since the Crayon documentation mentioned that you could also import the package from a local directory inside the app folder, I wanted to try it as well but ran into error mentioned above. Other packages seems to work fine on local import, only Crayons seems to have issues with being served by fdk.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.