-1
Good evening guys, I’m trying to run NPM RUN DEV and when I do he accuses a mistake that doesn’t make sense to me (despite being a total beginner in Latin).
[webpack-cli] /var/www/html/guild-cd17/webpack.mix.js:26
"scripts": {
^
SyntaxError: Unexpected token ':'
at new Script (vm.js:101:7)
at NativeCompileCache._moduleCompile (/var/www/html/guild-cd17/node_modules/v8-compile-
cache/v8-compile-cache.js:240:18)
at Module._compile (/var/www/html/guild-cd17/node_modules/v8-compile-cache/v8-compile-
cache.js:184:36)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (/var/www/html/guild-cd17/node_modules/v8-compile-cache/v8-compile-
cache.js:159:20)
at module.exports (/var/www/html/guild-cd17/node_modules/laravel-
mix/setup/webpack.config.js:8:5)
at /var/www/html/guild-cd17/node_modules/webpack-cli/lib/webpack-cli.js:908:43
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] development: `mix`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] 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! /home/rafael/.npm/_logs/2021-01-30T22_30_18_667Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] dev: `npm run development`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] 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! /home/rafael/.npm/_logs/2021-01-30T22_30_18_732Z-debug.log
Below is my file webpack.mix.js
const mix = require('laravel-mix');
/* |-------------------------------------------------------------------------- | Mix Asset Management |-------------------------------------------------------------------------- | | Mix provides a clean, Fluent API for Defining some Webpack build Steps | for your Laravel Applications. By default, we are compiling the CSS | file for the application as well as bundling up all the JS files. | */
mix.js('resources/js/scripts.js', 'public/js')
.postCss('resources/css/styles.css', 'public/css', [
require('postcss-import'),
require('tailwindcss'),
require('autoprefixer')
.setPublicPath('public')
]);
if (mix.inProduction()) {
mix.version();
};
"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",
"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"
}
I am since 13:00 trying to solve researching and turning but so far nothing. I appreciate the help.