Closed
Description
From Symfony Encore - FAQ.
This dependency was not found: some-module in ./path/to/file.js
Typically, a package will "advertise" its "main" file by adding a main key to its package.json.
But sometimes, old libraries won't have this.
I seem to have a different scenario than the one above.
To reproduce this, you may simply use the pace-js library which is only a single js file pace-js/pace.js
.
1 add pace-js
using yarn
$ yarn add --dev pace-js
2 Add pace-js
to webpack.config.js
Encore
// ...
.addEntry('whatever', 'pace-js')
Note: I also tried to include pace-js in a js file directly. Same error.
require('pace-js/pace.js');
3 Compile assets
$ ./node_modules/.bin/encore dev
Running webpack ...
ERROR Failed to compile with 1 errors 15:53:54
This dependency was not found:
* pace in ./node_modules/pace-js/pace.js
To install it, you can run: npm install --save pace
It seems webpack via Encore is asking for a library pace
which has nothing to do with this package at all.
Metadata
Metadata
Assignees
Labels
No labels