Closed ghost closed 4 years ago
Hello! Importing is not working for uuid. It says :
Failed to compile. ./src/App.js Attempted import error: 'uuid' does not contain a default export (imported as 'uuid').
But this is working : const uuid = require('uuid');
Why it is showing error?
As the error says, there is not default export with that name. This is the way to use it:
import { v4 as uuidv4 } from 'uuid';
Check https://www.npmjs.com/package/uuid
Oh yes! Now its working! Thanks!
You can close the issue now...
Hello! Importing is not working for uuid. It says :
But this is working : const uuid = require('uuid');
Why it is showing error?