HTML - Autoprefixer - 環境構築 - npm-5.10

クラウディア 
1. 概要
2. npm init

1. 概要

 さて、これは、前ページの状態で動作していた FreeBSD 上の gulp が portupgrade によってバージョンが変わったためにこけるようになったので環境を構築しなおす手順です。

2. npm init

 インストール済の npm をアップデートしたわけで・・・。  npm init からやりなおしとふんで。

> cd ~
> npm init
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.

See `npm help json` for definitive documentation on these fields
and exactly what they do.

Use `npm install <pkg>` afterwards to install a package and
save it as a dependency in the package.json file.

Press ^C at any time to quit.
package name: (ユーザ名)
 む?  変なパッケージをいれようとしているではないか。  これはひとつ、以前のファイルを削除したうえで init かな?

> rm package.json
> rm package-lock.json
> rm -R node_modules
> npm init
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.

See `npm help json` for definitive documentation on these fields
and exactly what they do.

Use `npm install <pkg>` afterwards to install a package and
save it as a dependency in the package.json file.

Press ^C at any time to quit.
package name: (ユーザ名)
 あら、おんなじ。  これはいきなりインストールになったのか?

> npm install --save-dev gulp
> npm install --save-dev gulp-sass
> npm install --save-dev gulp-autoprefixer
 やたらいっぱい、WARN が表示されましたがインストールできたようです。  どうやら gulp も動作しました。

> gulp --version
[12:39:41] CLI version 3.9.1
[12:39:41] Local version 3.9.1