LoginSignup
0
0

More than 1 year has passed since last update.

古いPC(Win7)でSalesforce DXの環境設定する

Last updated at Posted at 2022-01-18

クイックスタート: Lightning Web コンポーネント

上記プロジェクトを試しにお古のPCで試してみようと思ったら... あれ...updateできません。

sfdx-cli: Updating CLI from 7.66.2-4f159a1d07 to 7.94.3-a4e7c7955b... done
Node.js is only supported on Windows 8.1, Windows Server 2012 R2, or higher.
Setting the NODE_SKIP_PLATFORM_CHECK environment variable to 1 skips this
check, but Node.js might not execute correctly. Any issues encountered on
unsupported platforms will not be fixed.

あっ、このPCはWindows7だったなぁ。

調べてみるとNode v14はwindows7では使えないようです。

Windows7 で Node.js 14 を使う
Node.js 14.x supported on windows 8.1 and above?

この通りの設定をするんだけど...

image.png

困ったなぁ。ここに紹介されているnode-v14.18.3-win-x86では動きません。

色々調べてみるとv14.10なら動くらしい。さっそくZIPファイルを入手。
しかし起動しません。一瞬画面が出るけど中身が分からん。

さらに調べるとnode-v13.6.0-win-x86ならwin7でも動くみたい。
確かにエラーはでない。ではこれを使いましょう。

  1. 取りあえずこの解凍結果をC:\Program Filesにコピーします。

  2. 環境変数pathにこのフォルダーを追加
    スタート --> コンピュータで右クリック --> プロパティ --> システムの詳細設定 --> 環境変数
      image.png

  3. NODE_SKIP_PLATFORM_CHECK 1 この変数もセットします。

 image.png

しかし、この作業まではできるけど、次に進めないですね。
image.png

しかし、コマンドプロンプトから、以下のコマンドを叩くとちゃんと接続できています。
また、設定 --> ユーザ からログイン履歴を検索してみるとちゃんと成功してました。
中途半端な設定をしているんで、プレイグランドからの結果を戻せないのかもしれませんね。

image.png

続行します。

We couldn't find a Lightning web component named 'helloWorld'. 

確認を押すとエラー

あああ、検証先のプレイグランドの選択を間違えてました。
VSCodeで使ったプレイグランドを指定してませんでした。


参考資料
Salesforce CLIコマンド(開発用)

Salesforce CLI チートシート

Executing the SFDX Update command to update the CLI to latest version is not working

NodeJS for windows 7 [duplicate]

Node v14.15.0 (LTS)

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