Skip to content
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

Make chartjs and socket.io not to pull from cdn? #146

Open
bwgjoseph opened this issue May 20, 2020 · 2 comments · May be fixed by #192
Open

Make chartjs and socket.io not to pull from cdn? #146

bwgjoseph opened this issue May 20, 2020 · 2 comments · May be fixed by #192

Comments

@bwgjoseph
Copy link

Hi,

I'm using this in offline environment and it doesn't work because it seem that the scripts are pulling from cdn

<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.2.2/Chart.bundle.min.js"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.4.5/socket.io.min.js"></script>

I manually download the files are cdn, place it in my /public to host it instead then point to my host and it does work.. Any idea if the js files can be placed within the /javavscripts directory? So that it can reference local js file rather than cdn?

I am also facing issue where it complains about event-loop-stats not found, ignoring event loop metrics... I'm using node v12

@flogy
Copy link

flogy commented Oct 29, 2020

Would also be interested in this.

@lamweili
Copy link

lamweili commented Jun 5, 2022

I am also facing issue where it complains about event-loop-stats not found, ignoring event loop metrics... I'm using node v12

@bwgjoseph, You are missing the optional event-loop-stats module.
It should come installed when you do npm install express-status-monitor.

"optionalDependencies": {
"event-loop-stats": "1.2.0"
},

It complaints via a warn (not an error) as it is optional. You can do npm install event-loop-stats to get rid of it.


It's optional because the code handles it.

try {
eventLoopStats = require('event-loop-stats'); // eslint-disable-line
} catch (error) {
console.warn('event-loop-stats not found, ignoring event loop metrics...');
}

if (eventLoopStats) {
stat.loop = eventLoopStats.sense();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants