1
0

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 3 years have passed since last update.

npm run devのエラー改善

Posted at

Laravelでトップ画面をsassで作ろうとしたところ、
下記のようなエラーが出てしまいました。

ERROR in ./resources/sass/app.scss
Module build failed (from ./node_modules/css-loader/index.js):
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
ValidationError: Invalid options object. Sass Loader has been initialized using an options object that does not match the API schema.

どうやらNode.jsをインストールできていなかったことが原因だったみたいなので、
インストールを実行。

※インストール用のURLはこちら
https://nodejs.org/ja/download/

そのあと、npm run devを実行しても、もう一度エラーが出たので、下記を実行。

npm uninstall --save-dev sass-loader
npm install --save-dev sass-loader@7.1.0

これは、npmのsass-loaderのバージョンをアップグレードするものだそうです。

これにより、Compiled successfullyの文字が出て完了です。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?