用VSCode终端进行webpack打包时报错node_modules doesn't exist or is not a directory是怎么回事,求?

在终端打出webpack example.js -o app.js后显示node_modules doesn't exist or is not a directory
报错的内容:
ERROR in main
Module not found: Error: Can't resolve 'example.js' in 'E:\Vue\chapter01\demo2'
Did you mean './example.js'?
Requests that should resolve in the current directory need to start with './'.
Requests that start with a name are treated as module requests and resolve within module directories (node_modules).
If changing the source code is not an option there is also a resolve options called 'preferRelative' which tries to resolve these kind of requests in the current directory too.
resolve 'example.js' in 'E:\Vue\chapter01\demo2'
Parsed request is a module
No description file found in E:\Vue\chapter01\demo2 or above
resolve as module
E:\Vue\chapter01\demo2\node_modules doesn't exist or is not a directory
E:\Vue\chapter01\node_modules doesn't exist or is not a directory
E:\Vue\node_modules doesn't exist or is not a directory
E:\node_modules doesn't exist or is not a directory

请问怎样解决?

执行npm install

node_modules doesn't exist or is not a directory 的意思是不存在或者不是个文件夹

Module not found: Error: Can't resolve 'example.js' in 'E:\Vue\chapter01\demo2'
Did you mean './example.js'?
所以你chapter01\demo2文件夹下面有没有example.js文件,没有的话把用它的地方语句删了。