SOLVED: my problem was I initially copied the contents of the mflix-js folder into a new mflix-js folder instead of copying the entire mflix-js folder that came zipped. This probably resulted in missing important hidden files.
Hi, I’m having trouble running this and none of the solutions in this forum worked for me. I made sure to follow the instructions correctly, I believe. Here is what I get when I run
npm start :
> email@example.com start /Users/diogo/Development/projects/mflix-js > nodemon -L ./index.js [nodemon] 1.17.5 [nodemon] to restart at any time, enter `rs` [nodemon] watching: *.* [nodemon] starting `node ./index.js` /Users/diogo/Development/projects/mflix-js/src/index.js:1 import app from "./server"; ^^^ SyntaxError: Unexpected identifier at Module._compile (internal/modules/cjs/loader.js:760:23) at loader (/Users/diogo/Development/projects/mflix-js/node_modules/babel-register/lib/node.js:144:5) at Object.require.extensions.(anonymous function) [as .js] (/Users/diogo/Development/projects/mflix-js/node_modules/babel-register/lib/node.js:154:7) at Module.load (internal/modules/cjs/loader.js:685:32) at Function.Module._load (internal/modules/cjs/loader.js:620:12) at Module.require (internal/modules/cjs/loader.js:723:19) at require (internal/modules/cjs/helpers.js:14:16) at Object.<anonymous> (/Users/diogo/Development/projects/mflix-js/index.js:4:28) at Module._compile (internal/modules/cjs/loader.js:816:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10) [nodemon] app crashed - waiting for file changes before starting...
Here is what I see when I try the Shell:
And finally here is what I see when using Atlas:
Some more details:
I am on MAC.
NPM version: 6.9.2
Node version: 11.14.0
MongoDB shell version v4.0.10
My .env file:
SECRET_KEY=secretpasswordformongouniversity MFLIX_DB_URI=mongodb+srv://m220student:firstname.lastname@example.org/test?retryWrites=true&w=majority MFLIX_NS=sample_mflix PORT=5000