Uncaught Error: Cannot find module 'es6-promise'

Command-line interface (CLI)

I'm trying to run the following command in my Laravel application to generate and watch the frontend assets (JavaScript, CSS) in my project. I've installed Node.JS and npm on my local machine. I'm using Windows 10 on my computer. Both commands are available via the command line interface. 

$ npm run watch

The command throws an error and stops running. I get this error message in my console:

> Uncaught Error: Cannot find module 'es6-promise'

Could someone guide me to fix this problem? Thanks in advance!

 

JavaScript Programming Software Question created: 2020-08-04 10:24 HungaryBoy

14

I guess you didn't run the install command for your npm packages right now or your updated your package.json file and the required package is missing on your local machine.

Simply run this command and try again:

$ npm install

If the error still comes up. Please remove the your ./node_modules directory in your project directory and run $ npm install again. 

answered 2020-08-04 10:28 KipKop