Trouble with setting up program environment


I am currently having a problem setting up my dev environment. When setting up the database i get this error:

Any help would be appreciated


When restoring the database, add a --batchSize=100 argument to the mongorestore command, e.g.:

mongorestore --drop --batchSize=100

This is documented in the Mac dev setup wiki page, but it is applicable to Windows as well:

In version 3.0.7 of mongoDB is a bug in mongorestore. If you see an error like Failed: restore error: [some file name]: error restoring from dump/[some file name]: insertion error: EOF when running mongorestore, then try adding --batchSize=100 to the command. (try 1000, or 100, or even smaller) see here for a discussion on that


Thanks that fixed the problem.


I have another problem. When running npm run dev , I get 0 info it worked if it ends with ok
1 verbose cli [ ‘C:\Program Files (x86)\nodejs\node.exe’,
1 verbose cli ‘C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js’,
1 verbose cli ‘run’,
1 verbose cli ‘dev’ ]
2 info using npm@2.14.7
3 info using node@v4.2.2
4 verbose run-script [ ‘predev’, ‘dev’, ‘postdev’ ]
5 info predev codecombat@
6 info dev codecombat@
7 verbose unsafe-perm in lifecycle true
8 info codecombat@ Failed to exec dev script
9 verbose stack Error: codecombat@ dev: brunch watch --server
9 verbose stack Exit status 1
9 verbose stack at EventEmitter. (C:\Program Files (x86)\nodejs\node_modules\npm\lib\utils\lifecycle.js:214:16)
9 verbose stack at emitTwo (events.js:87:13)
9 verbose stack at EventEmitter.emit (events.js:172:7)
9 verbose stack at ChildProcess. (C:\Program Files (x86)\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
9 verbose stack at emitTwo (events.js:87:13)
9 verbose stack at ChildProcess.emit (events.js:172:7)
9 verbose stack at maybeClose (internal/child_process.js:818:16)
9 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
10 verbose pkgid codecombat@
11 verbose cwd C:\Sites\open source\codecombat
12 error Windows_NT 6.3.9600
13 error argv “C:\Program Files (x86)\nodejs\node.exe” “C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js” “run” "dev"
14 error node v4.2.2
15 error npm v2.14.7
16 error code ELIFECYCLE
17 error codecombat@ dev: brunch watch --server
17 error Exit status 1
18 error Failed at the codecombat@ dev script ‘brunch watch --server’.
18 error This is most likely a problem with the codecombat package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error brunch watch --server
18 error You can get their info via:
18 error npm owner ls codecombat
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]
I have tried reinstalling codecombat and npm. I have also tried adding npm to the PATH.


Hm, there’s little info in that error message, but it seems related to spawning a child process. Here are a few things you can try:

  • Did you install the npm dependencies? If not, run npm install
  • I’ve recently fixed a dev server bug on Windows. Try pulling the master branch (git pull).
  • Try running npm run dev on the regular Windows command prompt (cmd.exe) instead of Git Bash.