Open RaminMammadzada opened 3 years ago
It gives the following error when importing nanoid method inside pet.js file.
nanoid
pet.js
"errors": [ { "message": "nanoid is not a function",
https://github.com/FrontendMasters/fullstack-graphql/blob/f64d7759898c70360d1db3cf76c659ca352ec722/api/src/db/pet.js#L1
The nanoid function must be imported as named import as it is given in the documentation:
const { nanoid } = require('nanoid')
Issue:
It gives the following error when importing
nanoid
method insidepet.js
file.The exact location of import:
https://github.com/FrontendMasters/fullstack-graphql/blob/f64d7759898c70360d1db3cf76c659ca352ec722/api/src/db/pet.js#L1