Laravel環境でnpm run dev実行時に下記エラーになります。
package.json
{ "private": true, "scripts": { "dev": "npm run development", "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", "watch": "npm run development -- --watch", "watch-poll": "npm run watch -- --watch-poll", "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", "prod": "npm run production", "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" }, "devDependencies": { "axios": "^0.19", "bootstrap": "^4.0.0", "cross-env": "^5.1", "jquery": "^3.2", "laravel-mix": "^4.0.7", "lodash": "^4.17.13", "popper.js": "^1.16.1", "resolve-url-loader": "^2.3.1", "sass": "^1.20.1", "sass-loader": "^8.0.0", "vue": "^2.5.17", "vue-template-compiler": "^2.6.10" } }
エラーコード
> @ dev /Users/*/task/src > npm run development > @ development /Users/*/task/src > cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js 98% after emitting SizeLimitsPlugin ERROR Failed to compile with 2 errors 20:17:17 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. - options has an unknown property 'outputStyle'. These properties are valid: object { implementation?, sassOptions?, prependData?, sourceMap?, webpackImporter? } at validate (/Users/*/task/src/node_modules/sass-loader/node_modules/schema-utils/dist/validate.js:85:11) at Object.loader (/Users/*/task/src/node_modules/sass-loader/dist/index.js:36:28) at /Users/*/task/src/node_modules/webpack/lib/NormalModule.js:316:20 at /Users/*/task/src/node_modules/loader-runner/lib/LoaderRunner.js:367:11 at /Users/*/task/src/node_modules/loader-runner/lib/LoaderRunner.js:233:18 at runSyncOrAsync (/Users/*/task/src/node_modules/loader-runner/lib/LoaderRunner.js:143:3) at iterateNormalLoaders (/Users/*/task/src/node_modules/loader-runner/lib/LoaderRunner.js:232:2) at /Users/*/task/src/node_modules/loader-runner/lib/LoaderRunner.js:205:4 at /Users/*/task/src/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:85:15 at processTicksAndRejections (internal/process/task_queues.js:75:11) error in ./resources/sass/app.scss 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. - options has an unknown property 'outputStyle'. These properties are valid: object { implementation?, sassOptions?, prependData?, sourceMap?, webpackImporter? } at validate (/Users/*/task/src/node_modules/sass-loader/node_modules/schema-utils/dist/validate.js:85:11) at Object.loader (/Users/*/task/src/node_modules/sass-loader/dist/index.js:36:28) @ ./resources/sass/app.scss 2:14-253 Asset Size Chunks Chunk Names /js/app.js 1.39 MiB /js/app [emitted] /js/app 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. - options has an unknown property 'outputStyle'. These properties are valid: object { implementation?, sassOptions?, prependData?, sourceMap?, webpackImporter? } at validate (/Users/*/task/src/node_modules/sass-loader/node_modules/schema-utils/dist/validate.js:85:11) at Object.loader (/Users/*/task/src/node_modules/sass-loader/dist/index.js:36:28) at /Users/*/task/src/node_modules/webpack/lib/NormalModule.js:316:20 at /Users/*/task/src/node_modules/loader-runner/lib/LoaderRunner.js:367:11 at /Users/*/task/src/node_modules/loader-runner/lib/LoaderRunner.js:233:18 at runSyncOrAsync (/Users/*/task/src/node_modules/loader-runner/lib/LoaderRunner.js:143:3) at iterateNormalLoaders (/Users/*/task/src/node_modules/loader-runner/lib/LoaderRunner.js:232:2) at /Users/*/task/src/node_modules/loader-runner/lib/LoaderRunner.js:205:4 at /Users/*/task/src/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:85:15 at processTicksAndRejections (internal/process/task_queues.js:75:11) @ ./resources/sass/app.scss ERROR in ./resources/sass/app.scss (./node_modules/css-loader??ref--5-2!./node_modules/postcss-loader/src??postcss0!./node_modules/resolve-url-loader??ref--5-4!./node_modules/sass-loader/dist/cjs.js??ref--5-5!./resources/sass/app.scss) 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. - options has an unknown property 'outputStyle'. These properties are valid: object { implementation?, sassOptions?, prependData?, sourceMap?, webpackImporter? } at validate (/Users/*/task/src/node_modules/sass-loader/node_modules/schema-utils/dist/validate.js:85:11) at Object.loader (/Users/*/task/src/node_modules/sass-loader/dist/index.js:36:28) @ ./resources/sass/app.scss 2:14-253 npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR! @ development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js` npm ERR! Exit status 2 npm ERR! npm ERR! Failed at the @ development script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /Users/*/.npm/_logs/2020-02-16T11_17_20_445Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR! @ dev: `npm run development` npm ERR! Exit status 2 npm ERR! npm ERR! Failed at the @ dev script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /Users/*/.npm/_logs/2020-02-16T11_17_20_570Z-debug.log
エラー内容を読んでも、outputStyleが無いよと言われても、
なんのことか分からず、とりあえず、下記サイトを参考に、
全部クリアをしてから、やり直しましたが、
うまくいきませんでした。
ちなみに、今回のエラーと関係あるかわかりませんが、
npm installをした際に、
下記のような警告も出ています。
npm WARN deprecated popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v
原因をお教えいただけると幸いです。
よろしくお願いいたします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。