2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

`npm install --save-dev @prisma/cli` でエラー

Last updated at Posted at 2021-05-07

備忘録

結論


# @prisma/cli をアンイストール

yarn remove @prisma/cli

# prisma をインストール

yarn add prisma --dev

# prismaをついでにインストール

yarn add @prisma/client

yarn add @prisma/cli が非推奨になり、
yarn add prisma --dev が推奨されるようになりました。

# @prisma/cliをアンイストールする。
npm uninstall @prisma/cli
# prismaをインストールする。
npm install prisma --save-dev
# prismaをついでにインストール
npm install @prisma/client

Output:
┌───────────────────────┐
│                                                                       │
│     The package @prisma/cli has been renamed to prisma.   │
│                                                                        │
│     Please uninstall @prisma/cli first.                      │
│     Then install prisma to continue using Prisma CLI: │
│                                                                       │
│         # Uninstall old CLI                                      │
│         yarn remove @prisma/cli                              │
│                                                                        │
│         # Install new CLI                                         │
│         yarn add prisma --dev                                 │
│                                                                        │
│         # Invoke via npx                                         │
│         yarn prisma --help                                      │
│                                                                        │
│     Learn more here: https://github.com/prisma/prisma/releases/tag/2.16.0   │
│                                                                         │
└───────────────────────┘


ちょっと古い記事だと
npm uninstall @prisma/cliのままなのが結構あるので検索用として残します。

起こった問題

npm install --save-dev @prisma/cli
npm i -D @prisma/cli
yarn add @prisma/cli

のどれかでインストールすると

***err.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @prisma/cli@2.20.1 preinstall: `node scripts/preinstall-entry.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @prisma/cli@2.20.1 preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\hi\AppData\Roaming\npm-cache\_logs\2021-05-07T03_05_47_308Z-debug.log

とエラーが出る

原因

@prisma/cliの名前がバージョンアップに伴いprismaに変更されました。

2
1
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
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?