0
I’m trying to execute command npm run dev
in a project developed by another person.
This is the configuration in package.json:
"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": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"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 --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
And this is the mistake:
node_modules/webpack-cli/bin/cli.js:93
throw err;
^
TypeError: Cannot read property 'config' of undefined
The project is in Laravel and uses webpack. I have already tried to remove the npm packages and reinstall them, cleaned the cache, reinstalled Node, updated the packages, but nothing helped. How could I correct?
adds the app code.js
– 13dev
I don’t have that file on the project.
– Maurício
Without the code it’s hard to help
– Victor