learn-co-curriculum / react-hooks-npm-lab

Other
4 stars 6.19k forks source link

Edited readme to include date-fns version #34

Closed dado3899 closed 8 months ago

dado3899 commented 8 months ago

I changed it so that we are using a previous date-fns version as the solution, I saw a solution by a student that changed the import to:

import {format} from "date-fns";

Which fixes the build step but causes this error on npm start:

Uncaught TypeError: Failed to resolve module specifier "date-fns". Relative references must start with either "/", "./", or "../".

So the fastest solution I found was reverting the npm version but changing the import line is likely the solution we want, I could not get any imports working myself however

AlveeM commented 8 months ago

I've merged your change for now. I will look into alternatives and update the import statement if needed.