Laravel-mix: Can't resolve './src'

Created on 31 Dec 2018  路  4Comments  路  Source: JeffreyWay/laravel-mix

When i run node_modules/.bin/webpack i get this error.

Insufficient number of arguments or no entry found.
Alternatively, run 'webpack(-cli) --help' for usage info.

Hash: 2a1fd9d3ae435070bc30
Version: webpack 4.28.3
Time: 70ms
Built at: 2018-12-31 11:56:59

WARNING in configuration
The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/concepts/mode/

ERROR in Entry module not found: Error: Can't resolve './src' in '/Users/nikolag/Code/www/l-mix'

Most helpful comment

@JeffreyWay why was this closed? I had the same problem today, perhaps the docs should be updated with @juddlyon 's suggestion?

All 4 comments

You should not run webpack directly.

You should follow the installation instruction here
https://github.com/JeffreyWay/laravel-mix/blob/master/docs/installation.md

Yes, I follow this instruction.
I wan't do use mix in stand alone project, and i do exactly this steps.
I don't know where I'm wrong...

@ngrdanjski I agree that the instructions are misleading, I was getting the same error despite following the instructions verbatim.

Compile everything down by running node_modules/.bin/webpack from the command line.

If you look at the suggested NPM Scripts section below it, running the command requires that you pass in the config file:

node_modules/webpack/bin/webpack.js --config=node_modules/laravel-mix/setup/webpack.config.js

@JeffreyWay why was this closed? I had the same problem today, perhaps the docs should be updated with @juddlyon 's suggestion?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dtheb picture dtheb  路  3Comments

RomainGoncalves picture RomainGoncalves  路  3Comments

jpmurray picture jpmurray  路  3Comments

mstralka picture mstralka  路  3Comments

rlewkowicz picture rlewkowicz  路  3Comments