I'm just starting with node, and server stuff in general. I was following along with a well-reviewed youtube video and am at a loss here. I installed webpack and webpack-dev-server both globally and in my project folder. Now if I try to run webpack (typing nodejs webpack in the terminal) or webpack-dev-server, it just give me this error:
andrew@AndrewLaptop:~/Documents/mean-todo-app$ nodejs webpack
module.js:340
throw err;
^
Error: Cannot find module '/home/andrew/Documents/mean-todo-app/webpack'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:902:3
Shoudln't it be looking in mean-todo-app/node_modules/webpack instead of mean-todo-app/webpack?
Again, new to all of this so I could be missing something stupid, but I did search to no avail.
Thanks
edit: guess I could have mentioned I'm on Ubuntu if that matters
try using
npm install webpack
and do this in the root directory of your app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With