Problem with Installation!

Problem with Installation!
0

#1

Hello, Please help me install the FCC.
I want to Install FCC to Ubuntu.
I’m beginner. When I do docker-compose up
I have many errors.

connections on port 27017
server_1  | 
server_1  | > [email protected] start /fcc
server_1  | > babel-node server/server.js
server_1  | 
server_1  | sh: 1: babel-node: not found
server_1  | npm ERR! file sh
server_1  | npm ERR! code ELIFECYCLE
server_1  | npm ERR! errno ENOENT
server_1  | npm ERR! syscall spawn
server_1  | npm ERR! [email protected] start: `babel-node server/server.js`
server_1  | npm ERR! spawn ENOENT
server_1  | npm ERR! 
server_1  | npm ERR! Failed at the [email protected] start script.
server_1  | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
server_1  | npm WARN Local package.json exists, but node_modules missing, did you mean to install?
server_1  | 
server_1  | npm ERR! A complete log of this run can be found in:
server_1  | npm ERR!     /root/.npm/_logs/2018-01-12T16_48_33_161Z-debug.log
freecodecamp_server_1 exited with code 1

What am I to Do???
Please help me!!!


#2

Did you run npm install?


#3

Yes, I do it.
Now result :

server_1  | 
server_1  | > [email protected] start /fcc
server_1  | > babel-node server/server.js
server_1  | 
server_1  | /fcc/server/utils/webpack-code-split-polyfill.js:1
server_1  | (function (exports, require, module, __filename, __dirname) { export default function codeSplitPolyfill() {
server_1  |                                                               ^^^^^^
server_1  | 
server_1  | SyntaxError: Unexpected token export
server_1  |     at createScript (vm.js:80:10)
server_1  |     at Object.runInThisContext (vm.js:139:10)
server_1  |     at Module._compile (module.js:599:28)
server_1  |     at loader (/fcc/node_modules/babel-register/lib/node.js:144:5)
server_1  |     at Object.require.extensions.(anonymous function) [as .js] (/fcc/node_modules/babel-register/lib/node.js:154:7)
server_1  |     at Module.load (module.js:554:32)
server_1  |     at tryModuleLoad (module.js:497:12)
server_1  |     at Function.Module._load (module.js:489:3)
server_1  |     at Module.require (module.js:579:17)
server_1  |     at require (internal/module.js:11:18)
server_1  | npm ERR! code ELIFECYCLE
server_1  | npm ERR! errno 1
server_1  | npm ERR! [email protected] start: `babel-node server/server.js`
server_1  | npm ERR! Exit status 1
server_1  | npm ERR! 
server_1  | npm ERR! Failed at the [email protected] start script.
server_1  | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
server_1  | 
server_1  | npm ERR! A complete log of this run can be found in:
server_1  | npm ERR!     /root/.npm/_logs/2018-01-14T04_27_23_639Z-debug.log
freecodecamp_server_1 exited with code 1



#4

I did run into that error once or twice, can’t remember what I did to resolve it (sorry), but I’d suggest re-installing the project by deleting the node_modules folder and run npm install. Oh, and make sure you’re following the Contributor’s Guide. If it still doesn’t work for you, then I may redirect you to the Contributors Chat Room to seek help from more experienced people.


#5

Maybe check your node version? I think you need to be above 8.5.0 for native module support.


#6

Yes! I remember doing this - updating Node.
Thanks, @r1chard5mith.
@Bahodir94, you should try this solution first. I just checked the guide, FCC requires Node to be v8.9.3 or above. You can check your Node version by running the command node -v. To install, you’ll need to download the installer from Node’s website and install it on your machine. After the installation finishes, close and re-open the terminal, and then you can try running the FCC again
FYI: Another way to install/update Node is via command lines. I remember using this method but can’t remember what commands I used exactly. Also, you should update to v8 no matter what as it includes a fix for security vulnerability.


#7

Last time I did it, I used ‘n’ : https://github.com/tj/n

This lets you keep the old versions around to switch back if you need them.