I am using Linux mint. My node version is 9.4 and nmp version is 5.6
See the error i got when run "node server"
/var/www/html/mean/firstapp/server.js:1
(function (exports, require, module, __filename, __dirname) { import mongoose from 'mongoose';
^^^^^^
SyntaxError: Unexpected token import
at new Script (vm.js:51:7)
at createScript (vm.js:138:10)
at Object.runInThisContext (vm.js:199:10)
at Module._compile (module.js:624:28)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
at Function.Module._load (module.js:505:3)
at Function.Module.runMain (module.js:701:10)
at startup (bootstrap_node.js:193:16)
Generally i am getting this error from MongoDB
MongoDB shell version v3.6.2
connecting to: mongodb://127.0.0.1:27017/
MongoDB server version: 3.6.2
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
http://docs.mongodb.org/
Questions? Try the support group
http://groups.google.com/group/mongodb-user
Server has startup warnings:
2018-01-31T11:15:50.975+0530 I CONTROL [initandlisten]
2018-01-31T11:15:50.975+0530 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.
2018-01-31T11:15:50.975+0530 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted.
2018-01-31T11:15:50.975+0530 I CONTROL [initandlisten]
2018-01-31T11:15:50.975+0530 I CONTROL [initandlisten]
2018-01-31T11:15:50.975+0530 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2018-01-31T11:15:50.975+0530 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2018-01-31T11:15:50.975+0530 I CONTROL [initandlisten]
2018-01-31T11:25:28.254+0530 E - [main] Error loading history file: FileOpenFailed: Unable to fopen() file /home/ranjit/.dbshell: No such file or directory