「Windows11」electronをインストールする方法

環境

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
Windows 11 Pro 21H2 64bit
node.js v16.16.0
Windows 11 Pro 21H2 64bit node.js v16.16.0
Windows 11 Pro 21H2 64bit
node.js v16.16.0

操作方法
1.electronをインストールします。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
>npm i -D electron
>npm i -D electron
>npm i -D electron

2.electronを起動します。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
>npx electron
>npx electron
>npx electron

3.動作プロジェクト作成
「samplepro」というプロジェクト名で作成してます。
c:\>npx create-electron-app demopro

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
√ Initializing Project Directory
√ Initializing Git Repository
√ Locating custom template: "base"
√ Copying Starter Files
√ Initializing NPM Module
√ Installing Template Dependencies
√ Installing NPM Dependencies
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead. √ Initializing Project Directory √ Initializing Git Repository √ Locating custom template: "base" √ Copying Starter Files √ Initializing NPM Module √ Installing Template Dependencies √ Installing NPM Dependencies
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
√ Initializing Project Directory
√ Initializing Git Repository
√ Locating custom template: "base"
√ Copying Starter Files
√ Initializing NPM Module
√ Installing Template Dependencies
√ Installing NPM Dependencies

プロジェクト「demopro」に移動して起動します

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
c:\>cd demopro
c:\demopro>npm start
c:\>cd demopro c:\demopro>npm start
c:\>cd demopro
c:\demopro>npm start

 

Electron

Posted by arkgame