Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

Dev enviroment can't connect to localhost:3000

I started dev env with webpack (live update) and i’m getting can’t connect to localhost:3000. Any hints why would that happen?

codecombat@1.0.0 proxy /mnt/c/Users/User/Desktop/codecombat-master
COCO_PROXY=‘true’ nodemon

23 Mar 09:43:41 - [nodemon] v1.6.1
23 Mar 09:43:42 - [nodemon] reading config /mnt/c/Users/User/Desktop/codecombat-master/nodemon.json
23 Mar 09:43:42 - [nodemon] to restart at any time, enter rs
23 Mar 09:43:42 - [nodemon] ignoring: .git /mnt/c/Users/User/Desktop/codecombat-master/node_modules//* /mnt/c/Users/User/Desktop/codecombat-master/bower_components//* .sass-cache
23 Mar 09:43:42 - [nodemon] watching: server_config.js server_setup.coffee /mnt/c/Users/User/Desktop/codecombat-master/app/schemas/**/* ./server app/assets/main.html
23 Mar 09:43:42 - [nodemon] watching extensions: js,coffee
23 Mar 09:43:42 - [nodemon] starting node index.js
23 Mar 09:43:42 - [nodemon] child pid: 1291
/mnt/c/Users/User/Desktop/codecombat-master/server.coffee:5
GLOBAL._ = require(‘lodash’);
^

ReferenceError: GLOBAL is not defined
at /mnt/c/Users/User/Desktop/codecombat-master/server.coffee:2:3
at Object. (/mnt/c/Users/User/Desktop/codecombat-master/server.coffee:1:1)
at Object. (/mnt/c/Users/User/Desktop/codecombat-master/server.coffee:1:1)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.loadFile (/mnt/c/Users/User/Desktop/codecombat-master/node_modules/coffee-script/lib/coffee-script/register.js:16:19)
at Module.load (/mnt/c/Users/User/Desktop/codecombat-master/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object. (/mnt/c/Users/User/Desktop/codecombat-master/index.js:11:14)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47

23 Mar 09:43:42 - [nodemon] watching 174 files
23 Mar 09:43:42 - [nodemon] app crashed - waiting for file changes before starting…

Sorry Im not a subscriber, so I cant really help, but maybe @Deadpool198 or @PeterPalov may be able to help?

You don’t need to be a subscriber to use dev env

Yea, I have never really used it before so I cant really help

Looks like I’ll need to debug by myself… I’m awful at hosting web apps. Help still needed

If starting through docker:
Error: ENOENT: no such file or directory, stat ‘/coco/public/images/favicon/favicon.ico’
proxy_1 | at Object.fs.statSync (fs.js:948:11)
proxy_1 | at resolveSync (/coco/node_modules/serve-favicon/index.js:187:17)
proxy_1 | at favicon (/coco/node_modules/serve-favicon/index.js:61:12)
proxy_1 | at setupExpressMiddleware (/coco/server_setup.coffee:91:11)
proxy_1 | at Object.exports.setupMiddleware (/coco/server_setup.coffee:219:3)
proxy_1 | at module.exports.createAndConfigureApp (/coco/server.coffee:27:15)
proxy_1 | at Object.module.exports.startServer (/coco/server.coffee:15:9)
proxy_1 | at Object. (/coco/index.js:12:8)
proxy_1 | at Module._compile (module.js:653:30)
proxy_1 | at Object.Module._extensions…js (module.js:664:10)
proxy_1 | at Module.load (module.js:566:32)
proxy_1 | at tryModuleLoad (module.js:506:12)
proxy_1 | at Function.Module._load (module.js:498:3)
proxy_1 | at Function.Module.runMain (module.js:694:10)
proxy_1 | at startup (bootstrap_node.js:204:16)
proxy_1 | at bootstrap_node.js:625:3

This if just preview (not webpack):

codecombat@1.0.0 proxy /mnt/c/users/user/desktop/codecombat-master-1
COCO_PROXY=‘true’ nodemon

sh: 1: nodemon: not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! codecombat@1.0.0 proxy: COCO_PROXY='true' nodemon
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the codecombat@1.0.0 proxy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/xtreem/.npm/_logs/2021-03-23T08_22_13_547Z-debug.log

Can the problem be related to lodash installation?

Maybe… I’m setting up dev env for the first time

I did the exact same thing and had the same problem, as far as I can remember. Go here: https://codecombat.slack.com/
The devs will help you. And if you scroll up through the messages (there aren’t very many), you’ll find my (and other peoples’) problems, which I think may be quite similar to yours.
Danny

I don’t even understand what is dev eviroment. So I can’t help.

1 Like

I think its the one where you get lvl 196 and infinite gems, but idk how to set it up. @Chaboi_3000?

1 Like

I’d love to learn to hack codecombat, but I have windows, and according to all other topics about this stuff, it’s really hard without mac. I tried, but it requires a bunch of stuff that I don’t know how to use and may help me get viruses as far as I know.

1 Like

use heroku, just figured out

EDlT: oops, slug size too big