LoginSignup
0
0

More than 1 year has passed since last update.

react-nativeでreact-native-sqlite-storageをlinkしようとしたときにコマンドが見つからないと言われた時にした対処

Last updated at Posted at 2022-07-24

環境

Windows 10 Pro
react-native 7.0.4
npm 8.1.0
npx 10.2.2
node 16.13.0

事象

react-native-sqlite-storageを利用するために下記のコマンドを実行するとエラーが発生した。

react-native link react-native-sqlite-storage

エラー

react-native : 用語 'react-native' は、コマンドレット、関数、スクリプト ファイル、または操作可能なプログラムの名前として認識されません。名前が正しく記述されて 
いることを確認し、パスが含まれている場合はそのパスが正しいことを確認してから、再試行してください。
発生場所 行:1 文字:1
+ react-native link react-native-sqlite-storage
+ FullyQualifiedErrorId : CommandNotFoundException

対処

PS C:\Users\hoge> npx react-native link react-native-sqlite-storage
warn Calling react-native link [packageName] is deprecated in favor of autolinking. It will be removed in the next major release.
Autolinking documentation: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md

とりあえずコマンドは実行できた。
きっとベストプラクティスではないと思いますので、どなたかご存じであれば、正しい対処法を教えてください。

0
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
0
0