In fresh Laravel 5.8.35
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.1.0",
"cross-env": "^5.1",
"jquery": "^3.2",
"laravel-mix": "^4.0.7",
"lodash": "^4.17.13",
"popper.js": "^1.12",
"resolve-url-loader": "^2.3.1",
"sass": "^1.15.2",
"sass-loader": "^7.1.0",
"vue": "^2.5.17",
"vue-template-compiler": "^2.6.11"
}
}
Command
npm install
Command
npm run dev
Everything works fine, asset files generated.
PROBLEM
When downgrade bootstrap version as needed.
npm i bootstrap#3.4.1
Command
npm install
Command
npm run dev
Receive Errors :(
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):
#import '~bootstrap/scss/bootstrap';
^
Can't find stylesheet to import.
╷
8 │ #import '~bootstrap/scss/bootstrap';
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
╵
stdin 8:9 root stylesheet
in /Users/zarpio/code/p3backend/resources/sass/app.scss (line 8, column 9)
at /Users/zarpio/code/p3backend/node_modules/webpack/lib/NormalModule.js:316:20
at /Users/zarpio/code/p3backend/node_modules/loader-runner/lib/LoaderRunner.js:367:11
at /Users/zarpio/code/p3backend/node_modules/loader-runner/lib/LoaderRunner.js:233:18
at context.callback (/Users/zarpio/code/p3backend/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at /Users/zarpio/code/p3backend/node_modules/sass-loader/dist/index.js:89:7
at Function.call$2 (/Users/zarpio/code/p3backend/node_modules/sass/sass.dart.js:87203:16)
at _render_closure1.call$2 (/Users/zarpio/code/p3backend/node_modules/sass/sass.dart.js:76994:12)
at _RootZone.runBinary$3$3 (/Users/zarpio/code/p3backend/node_modules/sass/sass.dart.js:25521:18)
at _RootZone.runBinary$3 (/Users/zarpio/code/p3backend/node_modules/sass/sass.dart.js:25525:19)
at _FutureListener.handleError$1 (/Users/zarpio/code/p3backend/node_modules/sass/sass.dart.js:23975:19)
at _Future__propagateToListeners_handleError.call$0 (/Users/zarpio/code/p3backend/node_modules/sass/sass.dart.js:24271:40)
at Object._Future__propagateToListeners (/Users/zarpio/code/p3backend/node_modules/sass/sass.dart.js:3500:88)
at _Future._completeError$2 (/Users/zarpio/code/p3backend/node_modules/sass/sass.dart.js:24099:9)
at _AsyncAwaitCompleter.completeError$2 (/Users/zarpio/code/p3backend/node_modules/sass/sass.dart.js:23491:12)
at Object._asyncRethrow (/Users/zarpio/code/p3backend/node_modules/sass/sass.dart.js:3256:17)
at /Users/zarpio/code/p3backend/node_modules/sass/sass.dart.js:13326:20
at _wrapJsFunctionForAsync_closure.$protected (/Users/zarpio/code/p3backend/node_modules/sass/sass.dart.js:3279:15)
at _wrapJsFunctionForAsync_closure.call$2 (/Users/zarpio/code/p3backend/node_modules/sass/sass.dart.js:23512:12)
at _awaitOnObject_closure0.call$2 (/Users/zarpio/code/p3backend/node_modules/sass/sass.dart.js:23504:25)
at _RootZone.runBinary$3$3 (/Users/zarpio/code/p3backend/node_modules/sass/sass.dart.js:25521:18)
at _RootZone.runBinary$3 (/Users/zarpio/code/p3backend/node_modules/sass/sass.dart.js:25525:19)
at _FutureListener.handleError$1 (/Users/zarpio/code/p3backend/node_modules/sass/sass.dart.js:23975:19)
at _Future__propagateToListeners_handleError.call$0 (/Users/zarpio/code/p3backend/node_modules/sass/sass.dart.js:24271:40)
at Object._Future__propagateToListeners (/Users/zarpio/code/p3backend/node_modules/sass/sass.dart.js:3500:88)
at _Future._completeError$2 (/Users/zarpio/code/p3backend/node_modules/sass/sass.dart.js:24099:9)
at _AsyncAwaitCompleter.completeError$2 (/Users/zarpio/code/p3backend/node_modules/sass/sass.dart.js:23491:12)
at Object._asyncRethrow (/Users/zarpio/code/p3backend/node_modules/sass/sass.dart.js:3256:17)
at /Users/zarpio/code/p3backend/node_modules/sass/sass.dart.js:15981:20
at _wrapJsFunctionForAsync_closure.$protected (/Users/zarpio/code/p3backend/node_modules/sass/sass.dart.js:3279:15)
at _wrapJsFunctionForAsync_closure.call$2 (/Users/zarpio/code/p3backend/node_modules/sass/sass.dart.js:23512:12)
at _awaitOnObject_closure0.call$2 (/Users/zarpio/code/p3backend/node_modules/sass/sass.dart.js:23504:25)
at _RootZone.runBinary$3$3 (/Users/zarpio/code/p3backend/node_modules/sass/sass.dart.js:25521:18)
at _RootZone.runBinary$3 (/Users/zarpio/code/p3backend/node_modules/sass/sass.dart.js:25525:19)
at _FutureListener.handleError$1 (/Users/zarpio/code/p3backend/node_modules/sass/sass.dart.js:23975:19)
at _Future__propagateToListeners_handleError.call$0 (/Users/zarpio/code/p3backend/node_modules/sass/sass.dart.js:24271:40)
at Object._Future__propagateToListeners (/Users/zarpio/code/p3backend/node_modules/sass/sass.dart.js:3500:88)
# ./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):
#import '~bootstrap/scss/bootstrap';
^
Can't find stylesheet to import.
╷
8 │ #import '~bootstrap/scss/bootstrap';
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
╵
stdin 8:9 root stylesheet
in /Users/zarpio/code/p3backend/resources/sass/app.scss (line 8, column 9)
# ./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/zarpio/.npm/_logs/2020-04-09T11_47_10_138Z-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/zarpio/.npm/_logs/2020-04-09T11_47_10_177Z-debug.log
Bootstrap 3 and 4 have import paths. To import Bootstrap 3 using Webpack, use the following:
import 'bootstrap/dist/css/bootstrap.css';
This thread has more information.
Related
I am working on a project using laravel 7 and Vue Js but suddenly my program stop compiling whenever i type npm run watch or npm run dev i get the following error
Error code
> school#1.0.0 development C:\xampp4\htdocs\school
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
C:\xampp4\htdocs\school\node_modules\webpack-cli\bin\cli.js:281
throw err;
^
ValidationError: Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
- configuration.module.rules[10] has an unknown property 'loaders'. These properties are valid:
object { compiler?, dependency?, descriptionData?, enforce?, exclude?, generator?, include?, issuer?, loader?, mimetype?, oneOf?, options?, parser?, realResource?, resolve?, resource?, resourceFragment?, resourceQuery?, rules?, sideEffects?, test?, type?, use? }
-> A rule description with conditions and effects for modules.
at validate (C:\xampp4\htdocs\school\node_modules\webpack\node_modules\schema-utils\dist\validate.js:104:11)
at validateSchema (C:\xampp4\htdocs\school\node_modules\webpack\lib\validateSchema.js:73:2)
at create (C:\xampp4\htdocs\school\node_modules\webpack\lib\webpack.js:102:3)
at webpack (C:\xampp4\htdocs\school\node_modules\webpack\lib\webpack.js:139:31)
at f (C:\xampp4\htdocs\school\node_modules\webpack\lib\index.js:35:15)
at processOptions (C:\xampp4\htdocs\school\node_modules\webpack-cli\bin\cli.js:272:16)
at yargs.parse (C:\xampp4\htdocs\school\node_modules\webpack-cli\bin\cli.js:364:3)
at Object.parse (C:\xampp4\htdocs\school\node_modules\yargs\yargs.js:576:18)
at C:\xampp4\htdocs\school\node_modules\webpack-cli\bin\cli.js:49:8
at Object.<anonymous> (C:\xampp4\htdocs\school\node_modules\webpack-cli\bin\cli.js:366:3)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at runCli (C:\xampp4\htdocs\school\node_modules\webpack\bin\webpack.js:54:2)
at Object.<anonymous> (C:\xampp4\htdocs\school\node_modules\webpack\bin\webpack.js:140:2)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:282:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! school#1.0.0 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 1
npm ERR!
npm ERR! Failed at the school#1.0.0 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! C:\Users\Emmanuel\AppData\Roaming\npm-cache\_logs\2020-11-05T19_59_42_066Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! school#1.0.0 dev: `npm run development`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the school#1.0.0 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! C:\Users\Emmanuel\AppData\Roaming\npm-cache\_logs\2020-11-05T19_59_42_176Z-debug.log
C:\xampp4\htdocs\school>install -g n
'install' is not recognized as an internal or external command,
operable program or batch file.
C:\xampp4\htdocs\school>npm install -g n
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for n#6.7.0: wanted {"os":"!win32","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! notsup Valid OS: !win32
npm ERR! notsup Valid Arch: any
npm ERR! notsup Actual OS: win32
npm ERR! notsup Actual Arch: x64
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Emmanuel\AppData\Roaming\npm-cache\_logs\2020-11-05T20_04_55_252Z-debug.log
my Package.json is shown below:
{
"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 --disable-host-check --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",
"build": "webpack -p"
},
"devDependencies": {
"axios": "^0.21",
"bootstrap": "^4.5.3",
"cross-env": "^7.0.2",
"jquery": "^3.5",
"laravel-mix": "^5.0.7",
"lodash": "^4.17.20",
"popper.js": "^1.12",
"resolve-url-loader": "^3.1.2",
"sass": "^1.28.0",
"sass-loader": "^10.0.5",
"vue": "^2.6.12",
"vue-template-compiler": "^2.6.12"
},
"dependencies": {
"bootstrap-vue": "^2.18.1",
"copy-webpack-plugin": "^5.1.1",
"node-sass": "^5.0.0",
"vue-router": "^3.4.8",
"vue-router-dom": "^1.0.0-beta.1",
"vuex": "^3.5.1",
"webpack": "^5.4.0"
},
"name": "school",
"description": "<p align=\"center\"><img src=\"https://res.cloudinary.com/dtfbvvkyp/image/upload/v1566331377/laravel-logolockup-cmyk-red.svg\" width=\"400\"></p>",
"version": "1.0.0",
"main": "webpack.mix.js",
"directories": {
"test": "tests"
},
"author": "",
"license": "ISC"
}
I have tried following the steps in the this links but no success why I can not run npm run dev successfully in Laravel 7?https://github.com/JeffreyWay/laravel-mix/issues/1072webpack.js is not found in laravel vue app?. I have no idea on webpack and have been on this for days now please
Not sure if you've managed to find a solution for this yet or not, but I just ran into it and managed to fix it on my end.
rm -rf node_modules/
rm package.lock
Remove "webpack": "^5.4.0" from your package.json
npm install
You can probably get away with just npm uninstall webpack, but might need to run npm install again after.
Basically laravel-mix is using webpack 4 under the hood, so installing webpack 5 on top of it conflicts and throws errors related to removed/replaced directives in the webpack config file included in laravel-mix.
I ended up manually installing webpack due to NPM ENOENT errors, I'm assuming due to running the vagrant/homestead box under Windows. Switching to yarn instead of npm allowed me to install everything without issue. I can then use npm to run whatever commands, if necessary.
In your webpack.config.js file try to change loaders to rules. It seems that in Webpack 2 loaders has been replaced with rules.
See this post
this is my 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 --disable-host-check --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",
"serve": "node --version",
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node your-script.js"
},
"devDependencies": {
"axios": "^0.19",
"core-js": "^2.6.5",
"cross-env": "^7.0.2",
"laravel-mix": "^0.10.0np",
"lodash": "^4.17.19",
"resolve-url-loader": "^3.1.0",
"webpack": "^2.1.0-beta.22"
}
}
and the error is
$ npm run dev
# dev C:\xampp\htdocs\laspp
npm run development
# development C:\xampp\htdocs\laspp
cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
95% emitting
ERROR Failed to compile with 3 errors 5:48:21 PM
These dependencies were not found:
* jquery in ./resources/assets/js/bootstrap.js
* bootstrap-sass in ./resources/assets/js/bootstrap.js
* vue in ./resources/assets/js/bootstrap.js
To install them, you can run: npm install --save jquery bootstrap-sass vue
Asset Size Chunks Chunk Names
/js/app.js 603 kB 0 [emitted] [big] /js/app
mix-manifest.json 32 bytes [emitted]
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! C:\Users\Natty\AppData\Roaming\npm-cache\_logs\2020-10-13T00_48_22_038Z-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! C:\Users\Natty\AppData\Roaming\npm-cache\_logs\2020-10-13T00_48_22_141Z-debug.log
finally, I tried this
rm -rf node-modules
rm packageson-lock.json
npm cache clean --force
npm install
but it does not work
Looking your error and your package.json, this error tell you this :
To install them, you can run: npm install --save jquery bootstrap-sass vue
Can you do this and restart your npm run development ?
I was creating a new laravel project and while installing the npm this error occurred
Command that I ran was npm install
- Laravel Framework 8.6.0
- Node Version:- 8.10.0
Error:-
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 v1
loadDevDep:vue-template-c - |################---------------------------------|
WARN engine cross-env#7.0.2: wanted: {"node":">=10.14","npm":">=6","yarn":">=1"}npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm ERR! Linux 5.4.0-48-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! code EMISSINGARG
npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3)
npm ERR! typeerror at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22)
npm ERR! typeerror at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12)
npm ERR! typeerror at /usr/share/npm/lib/install/deps.js:457:7
npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror at /usr/share/npm/lib/fetch-package-metadata.js:37:12
npm ERR! typeerror at addRequestedAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:82:5)
npm ERR! typeerror at returnAndAddMetadata (/usr/share/npm/lib/fetch-package-metadata.js:117:7)
npm ERR! typeerror at pickVersionFromRegistryDocument (/usr/share/npm/lib/fetch-package-metadata.js:134:20)
npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror <http://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /home/kabir/.config/composer/vendor/laravel/installer/bin/White0.1/npm-debug.log
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 --disable-host-check --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": "^7.0",
"jquery": "^3.2",
"laravel-mix": "^5.0.1",
"lodash": "^4.17.19",
"popper.js": "^1.12",
"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"
}
}
I don't have any idea what's wrong, Please help. I hope this information is enough. do ask if more is needed.
I believe this is because you're using an older version of node & NPM that one (or more) of your dependencies doesn't support.
Using the same versions as you (Node#8.10.0 and NPM#3.5.2) I also get an error when running npm install.
With more recent versions (Node#12.15.0 and NPM#6.13.4) your package.json installs without a problem.
I have an error with npm when install in Laravel 6 it's now working I don't know despite of i did all the steps in order
this are my versions:
Laravel version 6
npm 6.13.7
Node 13.5.0
I did the commends in order
composer require laravel/ui --dev
php artisan ui vue --auth
npm install
npm run dev
but when do npm run dev it's error show
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 (D:\project\laravel\node_modules\sass-loader\node_modules\schema-utils\dist\validate.js:85:11)
at Object.loader (D:\project\laravel\node_modules\sass-loader\dist\index.js:36:28)
at D:\project\laravel\node_modules\webpack\lib\NormalModule.js:316:20
at D:\project\laravel\node_modules\loader-runner\lib\LoaderRunner.js:367:11
at D:\project\laravel\node_modules\loader-runner\lib\LoaderRunner.js:233:18
at runSyncOrAsync (D:\project\laravel\node_modules\loader-runner\lib\LoaderRunner.js:143:3)
at iterateNormalLoaders (D:\project\laravel\node_modules\loader-runner\lib\LoaderRunner.js:232:2)
at D:\project\laravel\node_modules\loader-runner\lib\LoaderRunner.js:205:4
at D:\project\laravel\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:85:15
at processTicksAndRejections (internal/process/task_queues.js:79: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 (D:\project\laravel\node_modules\sass-loader\node_modules\schema-utils\dist\validate.js:85:11)
at Object.loader (D:\project\laravel\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!
C:\Users\Ahmed\AppData\Roaming\npm-cache_logs\2020-02-22T21_12_44_218Z-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!
C:\Users\Ahmed\AppData\Roaming\npm-cache_logs\2020-02-22T21_12_44_441Z-debug.log
and this my 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",
"start": "webpack-dev-server --hot"
},
"devDependencies": {
"axios": "^0.19",
"bootstrap": "^4.0.0",
"bootstrap-sass": "^3.3.7",
"jquery": "^3.2",
"laravel-mix": "^4.0.7",
"lodash": "^4.17.13",
"popper.js": "^1.12",
"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"
},
"dependencies": {
"node-sass": "^4.13.1",
"webpack": "^4.41.6"
}
}
Thanks
Had same error, solved by reinstalling sass-loader v7.1
npm uninstall --save-dev sass-loader
npm install --save-dev sass-loader#7.1.0
i installed the npm using command-line successfully but when i use to run npm run dev it shows me some errors!
i have tried to replace the code of packages.json provided on github and reinstall npm but still getting same error.
npm run dev
C:\wamp64\www\shopping>npm run dev
'CALL "C:\Program Files\nodejs\\node.exe"
"C:\Program Files\nodejs\\node_modules\npm\bin\npm-cli.js" prefix -g' is
not recognized as an internal or external command,operable program or batch file.
# dev C:\wamp64\www\shopping
npm run development
npm ERR! file C:\WINDOWS\system32\cmd.exe;C:\Program Files\Java\jdk-10.0.2\bin;
npm ERR! path C:\WINDOWS\system32\cmd.exe;C:\Program Files\Java\jdk-10.0.2\bin;
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn C:\WINDOWS\system32\cmd.exe;C:\Program Files\Java\jdk-10.0.2\bin;
npm ERR! # dev: `npm run development`
npm ERR! spawn C:\WINDOWS\system32\cmd.exe;C:\Program Files\Java\jdk-10.0.2\bin;
ENOENT
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! C:\Users\hp\AppData\Roaming\npm-cache\_logs\2019-08-28T19_22_32_311Z-debug.log
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.18",
"bootstrap": "^4.1.0",
"cross-env": "^5.2.0",
"jquery": "^3.2",
"laravel-mix": "^4.0.7",
"lodash": "^4.17.5",
"popper.js": "^1.12",
"resolve-url-loader": "^2.3.1",
"sass": "^1.15.2",
"sass-loader": "^7.1.0",
"vue": "^2.5.17"
}
}