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

chartjs dependency issue during installation #1460

Closed
2 tasks done
ctrl-Felix opened this issue Apr 6, 2022 · 10 comments
Closed
2 tasks done

chartjs dependency issue during installation #1460

ctrl-Felix opened this issue Apr 6, 2022 · 10 comments
Labels
bug Something isn't working help

Comments

@ctrl-Felix
Copy link

⚠️ Please verify that this bug has NOT been raised before.

  • I checked and didn't find similar issue

🛡️ Security Policy

📝 Describe your problem

I am trying to install uptime-kuma through nodejs manually. When I run npm run setup I keep getting this:

npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: chartjs-adapter-dayjs@1.0.0
npm ERR! Found: chart.js@3.6.2
npm ERR! node_modules/chart.js
npm ERR!   chart.js@"~3.6.2" from the root project
npm ERR!   peer chart.js@"=> ^3.1.0" from vue-chart-3@3.0.9
npm ERR!   node_modules/vue-chart-3
npm ERR!     vue-chart-3@"3.0.9" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer chart.js@">= 2.8.0 < 3" from chartjs-adapter-dayjs@1.0.0
npm ERR! node_modules/chartjs-adapter-dayjs
npm ERR!   chartjs-adapter-dayjs@"~1.0.0" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: chart.js@2.9.4
npm ERR! node_modules/chart.js
npm ERR!   peer chart.js@">= 2.8.0 < 3" from chartjs-adapter-dayjs@1.0.0
npm ERR!   node_modules/chartjs-adapter-dayjs
npm ERR!     chartjs-adapter-dayjs@"~1.0.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /root/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-04-06T10_41_05_774Z-debug-0.log

npm install is throwing the same

https://www.npmjs.com/package/chartjs-adapter-dayjs -> There isn't much information there

🐻 Uptime-Kuma Version

1.13.1

💻 Operating System and Arch

Debian 11

🌐 Browser

None

🐋 Docker Version

No response

🟩 NodeJS Version

16.14.2

@ctrl-Felix ctrl-Felix added the help label Apr 6, 2022
@ctrl-Felix ctrl-Felix changed the title chartjs-adapter-dayjs@1.0.0 not compatible chartjs dependency issue during installation Apr 6, 2022
@louislam
Copy link
Owner

louislam commented Apr 6, 2022

npm install is throwing the same

The setup script should execute npm ci --prodcution instead of npm install. Did you really using npm run setup?

"setup": "git checkout 1.13.1 && npm ci --production && npm run download-dist",

@ctrl-Felix
Copy link
Author

The setup script should execute npm ci --prodcution instead of npm install. Did you really using npm run setup?

Yes, I initially executed npm run setup and I got that error .I then tried npm ci --production and got the same. That's when I tried npm install just to see if it would make any difference. It didn't.

@louislam
Copy link
Owner

louislam commented Apr 6, 2022

Strange, because it is a known issue for npm 8. npm ci --prodcution should be ok.

I can only reproduce the problem by deleting the package-lock.json file.

Is there the package-lock.json file in the directory?

Alternative you can install it by npm run install-legacy, but it is not recommended, because you may face file conflict issue later when you try to upgrade Uptime Kuma.

@ctrl-Felix
Copy link
Author

ctrl-Felix commented Apr 6, 2022

There is a package-lock.json in there. I tried it with Nodejs v17 and it is working now. v16 wasn't working

@ctrl-Felix
Copy link
Author

I will close this now as it's working with Node 17.

There might be a bug with v16 tho.

@usuall
Copy link

usuall commented Apr 6, 2022

I was occured same problem.
C:\virtualbox\uptime-kuma>node -v
v16.14.2

@ctrl-Felix
Copy link
Author

Seems like there's really a bug then @louislam

@louislam
Copy link
Owner

louislam commented Apr 6, 2022

Work fine on my Node 16.14.1, will test 16.14.2.

And what is your npm version? npm -v

@louislam
Copy link
Owner

louislam commented Apr 6, 2022

Ops, after update npm to 8.6.0, I can now reproduce the problem.

Related issue: npm/cli#4664

@louislam louislam reopened this Apr 6, 2022
@louislam louislam added the bug Something isn't working label Apr 6, 2022
@louislam
Copy link
Owner

louislam commented Apr 6, 2022

Fixed in 1.13.2, thanks for the report.

@louislam louislam closed this as completed Apr 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help
Projects
None yet
Development

No branches or pull requests

3 participants