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

Windows環境(cmd)でSaasの環境構築

Posted at

学校の図書館で手に取ったこちらの本でSaasを導入しようとして、
Chapter1から詰んで時間かかったので、備忘録メモ

ちなみに書籍では、gulpを使って、saasファイルを更新するたびにcssファイルを掃き出す様になるらしい

(なお、本の☆レビューは酷評の模様)

実行環境

    OS:Windows 11 Home
    バージョン:22H2

エラーの対応方法

上記記事を参照して、ゴミデータになりそうな以下の項目を削除

・node_modules ディレクトリ
・package-lock.json
・yarn-lock.json

Pythonのバージョン

pythonは3だとエラー起きるから、2.x系がいいという記事を多くみたので、3を消して2.7を入れた。
スクリーンショット 2023-10-09 180917.png

Node.jsのバージョン

こちらの記事でv12,v14系だとエラーが起きるとのことで、
私も同様エラーが発生していたのもあり、v10に変更。

スクリーンショット 2023-10-09 180546.png

Nodeとnode-sassのバージョンをあわせる

以下のサイトでnode-sassのバージョンが公開されている。
また、Node.jsとnode-sassのバージョンは互いに対応しているバージョンを入れないといけないと他の記事で書いてあった。

image.png

さっき、Node.jsはv10にしたので、上記表から対応するnode-sassは4.10以上だとわかる。

image.png

4.10以上のバージョンのうち、4.14.1がdownloadが多いからpackage.jsonに以下を追記する

"node-sass": "^4.14.1"

image.png

npmのインストール

あとは書籍のインストールに従って、Node.jsパッケージ、およびgulp(ガルプ)の導入をした。

npm install gulp -g
npm install

バージョン詳細

一応、実行時のバージョンをスクショしておく

スクリーンショット 2023-10-09 180810.png

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