Yesterday, I successfully packaged the Vue component using webpack, but today, after restarting my computer, the same packaging failed(all work was done in venv)
the cmd is:
npx webpack ./body/static/blog/js/webpack.config.js
There are 20 such warnings:
WARNING in ./node_modules/@vue/compiler-sfc/dist/compiler-sfc.esm-browser.js 45251:43-50
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
and 106 such errors:
ERROR in ./body/static/blog/js/webpack.config.js 1:14-29
Module not found: Error: Can’t resolve ‘path’ in ‘D:workblogbodystaticblogjs’
I usually install module like this:
(venv) D:workblog> npm install xxx
This has happened before, and I can only successfully use a module the first time it is installed. After restarting, I cannot
I have tried some methods:
Delete node_ Modules and package_lock.json, npm install again
npm update
but failed
I would like to know where there are problems with my method of using node_module and how to operate it correctly