1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

[plugin:vite:import-analysis] Failed to resolve import "faker" from "src/components/pages/Users.jsx". Does the file exist?

1
Posted at

はじめに

  • @faker-js/fakerの話。メンテされている@faker-js/fakerの方を使うことに注意

問題

  • @faker-js/fakerを入れたのに使えない

解決

  • import { faker } from 'faker'; を import { faker } from '@faker-js/faker';にして解決

終わりに

  • インストールまではセキュリティ怖いからちゃんと公式見てコピペしてきたが、import手順をエディタの保管をよく見ずにやってしまった。
  • ライブラリは全体として整合性とって最小の変更で対応できるのと、セキュリティの問題があるので人間が手でやる方が対応得意そうなので基本手動でやりたい。
  • 学習ではなく実務で工数削減する場合、ライブラリ入れた後の作業はAIに任せるのが良さそうだ

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?