maakbaas / esp8266-iot-framework

Framework for IoT projects implementing HTTPS requests, a React web interface, WiFi manager, live dashboard, configuration manager, file manager and OTA updates.
GNU General Public License v3.0
417 stars 113 forks source link

Error when run "npm ci" #152

Closed loiiiic closed 1 year ago

loiiiic commented 2 years ago

Hello,

I have just implemented your framework with the standard configuration and everything works perfectly. Thanks for the great work!

The next step for me is to customize the html file. For that, I did the following actions:

but I get this output :

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: styled-components@5.1.0
npm ERR! Found: react@16.14.0
npm ERR! node_modules/react
npm ERR!   peer react@"^0.14.0 || ^15.0.0 || ^16.0.0" from mini-create-react-context@0.3.2
npm ERR!   node_modules/mini-create-react-context
npm ERR!     mini-create-react-context@"^0.3.0" from react-router@5.1.2
npm ERR!     node_modules/react-router
npm ERR!       react-router@"5.1.2" from react-router-dom@5.1.2
npm ERR!       node_modules/react-router-dom
npm ERR!         react-router-dom@"^5.1.2" from the root project
npm ERR!   peer react@"*" from react-icons@4.2.0
npm ERR!   node_modules/react-icons
npm ERR!     react-icons@"^4.2.0" from the root project
npm ERR!   5 more (react-motion, react-router, react-router-dom, react-vis, styled-components)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react-dom@">= 16.8.0" from styled-components@5.1.0
npm ERR! node_modules/styled-components
npm ERR!   styled-components@"^5.1.0" from the root project
npm ERR!   peer styled-components@">= 2" from babel-plugin-styled-components@1.10.7
npm ERR!   node_modules/babel-plugin-styled-components
npm ERR!     dev babel-plugin-styled-components@"^1.10.7" from the root project
npm ERR!     1 more (styled-components)
npm ERR!   1 more (styled-normalize)
npm ERR! 
npm ERR! Conflicting peer dependency: react@18.1.0
npm ERR! node_modules/react
npm ERR!   peer react@"^18.1.0" from react-dom@18.1.0
npm ERR!   node_modules/react-dom
npm ERR!     peer react-dom@">= 16.8.0" from styled-components@5.1.0
npm ERR!     node_modules/styled-components
npm ERR!       styled-components@"^5.1.0" from the root project
npm ERR!       2 more (babel-plugin-styled-components, styled-normalize)
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 /home/loic/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/loic/.npm/_logs/2022-05-09T14_38_10_224Z-debug-0.log

Not being familiar with npm, but I guess it's a versioning issue between the packages associated with NPM on my computer and those requested by your framework. What is good practice in this case?

Thank you!

loiiiic commented 2 years ago

Hello,

I have continued to investigate and can now run the npm ci command and npm run build.

To do this, I uninstalled the node.JS v18.1.0 version with : nvm uninstall v18.1.0

Then install the node.JS LTS version (16.15.0) with : nvm install --lts

Eisbaeeer commented 2 years ago

If you installed LTS on Windows10 and run into the same error, you can also try the following: npm ci --save --legacy-peer-deps You have to install legacy-peer-deps before.

ss89 commented 2 years ago

i do actually have the same issue where i am building a ci for a project i want to try out: https://github.com/ss89/Ferraris_MQTT_Energy_Counter_Meter_TCRT5000/actions/runs/3244592852/jobs/5320967950

I did switch from node 18 to node 16, but it doesn't seem to make a difference.

Any suggestions what to try? I actually want to contribute to your project with this @Eisbaeeer :-D

ss89 commented 2 years ago

switching down to node 14 actually seemed to fix the issue. interesting.

ss89 commented 1 year ago

I don't see a PR mentioned, how was this fixed?

maakbaas commented 1 year ago

@ss89 See 3a39b7ae3282e38cbc7f3f971e5c236c0d646e77

ss89 commented 1 year ago

Thank you 👍🏻