AccordBox / python-webpack-boilerplate

Django Webpack boilerplate & Flask Webpack boilerplate
https://python-webpack-boilerplate.rtfd.io
MIT License
169 stars 20 forks source link

Problem with Executing `npm run build` Using `esbuild` & `Node` 17.6.0 - "The Callback Was Already Called" #30

Closed FilipWozniak closed 2 years ago

FilipWozniak commented 2 years ago

I regularly configure the project using "Python Webpack Boilerplate" guide. More specifically, I install Wagtail (Django), run npm command at frontend directory, enable live reloading feature, import Vue and also enable esbuild. I have always used Node 14.19.0, but lately thought to give you a chance of a newer version - 17.6.0. At the time of executing npm run build command, I get the following error:

/Users/filip/Desktop/dj-wgt/wgt/frontend/node_modules/loader-runner/lib/LoaderRunner.js:119
            throw new Error("callback(): The callback was already called.");
                  ^
Error: callback(): The callback was already called.
    at context.callback (/Users/filip/Desktop/dj-wgt/wgt/frontend/node_modules/loader-runner/lib/LoaderRunner.js:119:10)
    at Object.ESBuildLoader (/Users/filip/Desktop/dj-wgt/wgt/frontend/node_modules/esbuild-loader/dist/loader.js:62:9)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
image

I don't use Docker. I use Python 3.9.0, though.

Any ideas how to solve this issue?

FilipWozniak commented 2 years ago

It turned out that running npm outdate revealed a few outdated packages.

image

So the solution was as easy as executing npm update.