bradtraversy / react_crash_todo

React crash course files
372 stars 322 forks source link

compile errors in app.js #16

Open ddetton opened 4 years ago

ddetton commented 4 years ago

After installing create-react-app, uuid, axios and react-router, I loaded the code in this repo and got a compile error in app.js. To fix the problem, I commented out the following:

import uuid from 'uuid'; res.data.id = uuid.v4(); in the addTodo method

ishitb commented 4 years ago

You probably installed a different version of "uuid". Please check the packages.json file for the correct version and install that and then try

AbhiramVijayan commented 4 years ago

Try:

import { v4 as uuidv4 } from 'uuid'; id:uuidv4(),

4Clarity commented 4 years ago

thanks


From: Abhiram vijayan notifications@github.com Sent: Tuesday, August 11, 2020 11:33 AM To: bradtraversy/react_crash_todo react_crash_todo@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: Re: [bradtraversy/react_crash_todo] compile errors in app.js (#16)

Try:

import { v4 as uuidv4 } from 'uuid'; id:uuidv4(),

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/bradtraversy/react_crash_todo/issues/16#issuecomment-672019923, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANRAKXT63HJVU7IC5EH64VTSAFQDNANCNFSM4M3X5QPQ.