使用uuid報錯:`const uuidv1 = require('uuid/v1');` is deprecated as of uuid@7.

使用uuid報錯:Deep requiring like `const uuidv1 = require('uuid/v1');` is deprecated as of [email protected]. Please require the top-level module when using the Node.js CommonJS module or use ECMAScript Modules when bundling for the browser. 

import uuidv1 from 'uuid/v1'改爲import { v1 as uuidv1 } from 'uuid'即可

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章