M220JS Chapter 0 Starting mflix

I’m having trouble starting the mflix app.
I followed all the instructions and when I put the command “npm install”, the application crashes.

The terminal:

PS C:\Users\User\Documents\MEGAsync\Programación\mflix-js> npm start
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.

> server@1.0.0 start   
> nodemon -L ./index.js

[nodemon] 2.0.19
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,json  
[nodemon] starting `node ./index.js`        
node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module '@babel/register'
Require stack:
- C:\Users\User\Documents\MEGAsync\Programación\mflix-js\index.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (C:\Users\User\Documents\MEGAsync\Programación\mflix-js\index.js:1:1)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\Users\\User\\Documents\\MEGAsync\\Programación\\mflix-js\\index.js'
  ]
}
[nodemon] app crashed - waiting for file changes before starting...

1 Like

This happened to me as well. Running on Ubuntu 20.04, node install gave lots of deprecations and errors. I posted them in this link:

https://github.com/thunderrabbit/rolling-through-M220JS/blob/master/2022-09-16T22_31_39_089Z-debug-0.log

Ignoring the errors and running the app with npm start I got the same error as Zury:

vagrant@ubuntu-focal:~/mflix-js$ npm start

> server@1.0.0 start
> nodemon -L ./index.js

[nodemon] 2.0.19
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node ./index.js`
node:internal/modules/cjs/loader:958
  throw err;
  ^

Error: Cannot find module '@babel/register'
Require stack:
- /home/vagrant/mflix-js/index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:955:15)
    at Module._load (node:internal/modules/cjs/loader:803:27)
    at Module.require (node:internal/modules/cjs/loader:1021:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (/home/vagrant/mflix-js/index.js:1:1)
    at Module._compile (node:internal/modules/cjs/loader:1119:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1173:10)
    at Module.load (node:internal/modules/cjs/loader:997:32)
    at Module._load (node:internal/modules/cjs/loader:838:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/home/vagrant/mflix-js/index.js' ]
}

Node.js v18.9.0
[nodemon] app crashed - waiting for file changes before starting...

Hello!

Check this link it helped me to solve my problem:

i am getting an error EHOSTUNREACH when i installing dependencies