I got the same error, I'm using laravel 5.4 with webpack, here package.json before:
{
...
...
"devDependencies": {
"jquery": "^1.12.4",
...
...
},
"dependencies": {
"datatables.net": "^2.1.1",
...
...
}
}
I had to move jquery
and datatables.net
npm packages under one of these "dependencies": {}
or "devDependencies": {}
in package.json
and the error disappeared, after:
{
...
...
"devDependencies": {
"jquery": "^1.12.4",
"datatables.net": "^2.1.1",
...
...
}
}
I hope that helps!