material-components / material-components-web-codelabs

Codelabs for Material Components for Web (MDC Web)
MIT License
129 stars 102 forks source link

[codelab] MDC-102 Web conflict with npm package versions #386

Open mateus-dias-cwb opened 2 years ago

mateus-dias-cwb commented 2 years ago

If you follow from MDC-101 to MDC-102 with the same project you get an error when trying to compile the project.

The issue is the different versions of npm packages that the tutorial tell you to install. MDC-101 tells you to npm install @material/textfield@^6.0.0 but MDC-102 tells you to npm install @material/drawer @material/list.

The issue is that when installing the packages without specifying a version the installed version happens to be 14, not 6 and this causes the app to not compile.

I solve this by uninstalling the drawer and list packages and reinstalling them with @^6.0.0 at the end. I think this info should be added somewhere in the codelabs.

akgupta002 commented 1 year ago

If you follow from MDC-101 to MDC-102 with the same project you get an error when trying to compile the project.

The issue is the different versions of npm packages that the tutorial tell you to install. MDC-101 tells you to npm install @material/textfield@^6.0.0 but MDC-102 tells you to npm install @material/drawer @material/list.

The issue is that when installing the packages without specifying a version the installed version happens to be 14, not 6 and this causes the app to not compile.

I solve this by uninstalling the drawer and list packages and reinstalling them with @^6.0.0 at the end. I think this info should be added somewhere in the codelabs.

Thank you @mateus-dias-cwb for sharing your insight. It really helped me out.