Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to launch commuter #249

Closed
maytronics-ben opened this issue Jan 21, 2019 · 19 comments
Closed

Unable to launch commuter #249

maytronics-ben opened this issue Jan 21, 2019 · 19 comments
Assignees

Comments

@maytronics-ben
Copy link

I am trying to set up commuter to work with an s3 storage backend on an Amazon EC2 instance.

Referencing the documentation at https://github.com/nteract/commuter I have set the relevant environment variables with the following commands:

export COMMUTER_STORAGE_BACKEND=s3
export COMMUTER_BUCKET=bucket-name

But when trying to launch commuter via commuter command I get the following error:

CONFIGURED DISCOVERY none
Running in the current working directory,  /home/jupyter-tljh_admin
internal/modules/cjs/loader.js:583
    throw err;
    ^

Error: Cannot find module './config/babel.flow.config'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/usr/local/share/.config/yarn/global/node_modules/@nteract/webpack-configurator/index.js:12:25)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)

Would love to get this set up, is this a reasonable place to ask for this sort of help?
Thanks,

@erolosty
Copy link

@rgbkrk Is this still the right repo to track issues against?

I also couldn't run, after doing an npm install as suggested by the docs.

@aquazure I could get it to start if I clone master, maybe thats what you'll need to do for now too

@erolosty
Copy link

@aquazure yours may be a dupe of: #247

@maytronics-ben
Copy link
Author

@erolosty

Retried with:

npm install https://github.com/nteract/commuter.git
yarn add https://github.com/nteract/commuter.git

As well as cloning master branch into local directory and running commuter command

I still get thrown the same error, however...

@rgbkrk
Copy link
Member

rgbkrk commented Jan 23, 2019

Super sorry! This is the right repo. We've been going through some structural changes with the nteract repos so I didn't get this one back to a normal state. On my end I've been focused on an internal fork of commuter (at Netflix) and want to get the changes to be minimal on both while getting prod mode back to working for the deployed version externally.

I've sadly not been running with the commuter command, instead using either yarn dev or yarn start (after assets have been built). Does that work for you on master for the moment?

@erolosty
Copy link

Hey, don't worry! We all have day jobs, that tend to not focus around supporting random folk from the interwebs :)

I managed to get it to start with:

npm run start

This gets me into a state in which the bottom half of each page (directory tree and notebooks) takes a full screen's worth of space and simply says:

An unexpected error has occurred.

in the center of the page.

If there is some way to turn up the verbosity of logging, I'd be happy to try it out. My guess (given that this is the issue, that started me down the path to building it myself, when the version in npm broke) is that the cause of the error message is the same as: #248

But I don't have anything in the logs that proves it

@erolosty
Copy link

erolosty commented Feb 7, 2019

ping /feelsbad

@romeran
Copy link

romeran commented Feb 10, 2019

Guess it's the same issue as here?
@rgbkrk any news?

@rgbkrk
Copy link
Member

rgbkrk commented Feb 10, 2019

I just migrated all the issues for commuter over to this repo and will start handling an overhaul of commuter with a few other folks. My most recent relevant update is from #249 (comment):

Super sorry! This is the right repo. We've been going through some structural changes with the nteract repos so I didn't get this one back to a normal state. On my end I've been focused on an internal fork of commuter (at Netflix) and want to get the changes to be minimal on both while getting prod mode back to working for the deployed version externally.

I've sadly not been running with the commuter command, instead using either yarn dev or yarn start (after assets have been built). Does that work for you on master for the moment?

@SelinGungor
Copy link

Is this Issue fixed? I am getting the error below, after installing babel manually npm install -g babel-cli:

`SyntaxError: backend/config.js: Unexpected token, expected , (3:22)
1 | // @flow
2 |

3 | function deprecate(env: Object, oldVar: string, newVar: string) {
| ^
4 | if (env[oldVar]) {
5 | console.warn(${oldVar} is deprecated, please use ${newVar});
6 | }
`

@rgbkrk
Copy link
Member

rgbkrk commented Feb 25, 2019

It's not fixed and not ready for consumption currently. We're doing some internal fixups and will be posting a refreshed commuter soon.

Curiosity -- will you be backing notebooks with local storage or S3?

@taniki
Copy link
Contributor

taniki commented Feb 26, 2019

I managed to run it with pm2. There is a weird react error but nothing critical. I am using it with s3 over s3fs because commuter doesn't seem to support s3 custom endpoint yet (same for papermill).

@SelinGungor
Copy link

SelinGungor commented Feb 26, 2019

Local storage @rgbkrk.

@erolosty
Copy link

Local Storage

@weldpua2008
Copy link

weldpua2008 commented Feb 27, 2019

@taniki Can you share how you run it?

# export COMMUTER_STORAGE_BACKEND=s3
# export COMMUTER_BUCKET=my-special-bucket-name
# /usr/local/nodejs-binary-8.15.0/bin/pm2 start commuter
[PM2] Starting /usr/bin/commuter in fork_mode (1 instance)
[PM2] Done.
┌──────────┬────┬─────────┬──────┬───────┬────────┬─────────┬────────┬─────┬───────────┬──────┬──────────┐
│ App name │ id │ version │ mode │ pid   │ status │ restart │ uptime │ cpu │ mem       │ user │ watching │
├──────────┼────┼─────────┼──────┼───────┼────────┼─────────┼────────┼─────┼───────────┼──────┼──────────┤
│ commuter │ 0  │ N/A     │ fork │ 13273 │ online │ 0       │ 0s     │ 0%  │ 15.1 MB   │ root │ disabled │
└──────────┴────┴─────────┴──────┴───────┴────────┴─────────┴────────┴─────┴───────────┴──────┴──────────┘
# /usr/local/nodejs-binary-8.15.0/bin/pm2 logs commuter 
/root/.pm2/logs/commuter-error.log last 15 lines:
0|commuter |     at Object.Module._extensions..js (module.js:664:10)
0|commuter |     at Module.load (module.js:566:32)
0|commuter |     at tryModuleLoad (module.js:506:12)
0|commuter |     at Function.Module._load (module.js:498:3) code: 'MODULE_NOT_FOUND' }
0|commuter | { Error: Cannot find module './config/babel.flow.config'
0|commuter |     at Function.Module._resolveFilename (module.js:548:15)
0|commuter |     at Function.Module._load (module.js:475:25)
0|commuter |     at Module.require (module.js:597:17)
0|commuter |     at require (internal/module.js:11:18)
0|commuter |     at Object.<anonymous> (/usr/lib/node_modules/@nteract/commuter/node_modules/@nteract/webpack-configurator/index.js:12:25)
0|commuter |     at Module._compile (module.js:653:30)
0|commuter |     at Object.Module._extensions..js (module.js:664:10)
0|commuter |     at Module.load (module.js:566:32)
0|commuter |     at tryModuleLoad (module.js:506:12)
0|commuter |     at Function.Module._load (module.js:498:3) code: 'MODULE_NOT_FOUND' }

@taniki
Copy link
Contributor

taniki commented Feb 27, 2019

@weldpua2008

ecosystem.config.js

module.exports = {
  apps : [{
    name: 'commuter',
    script: 'lib/index.js',

    instances: 1,
    autorestart: true,
    watch: true,
    max_memory_restart: '1G',
    env: {
      NODE_ENV: 'development'
    },
    env_production: {
      NODE_ENV: 'production',
      
      COMMUTER_STORAGE_BACKEND: 'local',
      COMMUTER_PORT: '80',
      COMMUTER_LOCAL_STORAGE_BASEDIRECTORY: "/root/notebooks/"
    }
  }]
};

and

$ pm2 [start/restart] ecosystem.config.js --env production

@weldpua2008
Copy link

weldpua2008 commented Feb 27, 2019

@taniki thank you for your quick response.

I tried the solution but it fails in the same way:

0|commuter  | { Error: Cannot find module './config/babel.flow.config'
0|commuter  |     at Function.Module._resolveFilename (module.js:548:15)
0|commuter  |     at Function.Module._load (module.js:475:25)
0|commuter  |     at Module.require (module.js:597:17)
0|commuter  |     at require (internal/module.js:11:18)
0|commuter  |     at Object.<anonymous> (/usr/local/nodejs-binary-8.15.0/lib/node_modules/@nteract/commuter/node_modules/@nteract/webpack-configurator/index.js:12:25)
0|commuter  |     at Module._compile (module.js:653:30)
0|commuter  |     at Object.Module._extensions..js (module.js:664:10)
0|commuter  |     at Module.load (module.js:566:32)
0|commuter  |     at tryModuleLoad (module.js:506:12)
0|commuter  |     at Function.Module._load (module.js:498:3)
0|commuter  |     at Module.require (module.js:597:17)
0|commuter  |     at require (internal/module.js:11:18)
0|commuter  |     at Object.<anonymous> (/usr/local/nodejs-binary-8.15.0/lib/node_modules/@nteract/commuter/next.config.js:1:84)
0|commuter  |     at Module._compile (module.js:653:30)
0|commuter  |     at Object.Module._extensions..js (module.js:664:10)
0|commuter  |     at Module.load (module.js:566:32) code: 'MODULE_NOT_FOUND' }

Maybe the path /usr/local/nodejs-binary-8.15.0/lib/node_modules/@nteract/commuter/lib/index.js is wrong?

# cat ecosystem.config.js 
module.exports = {
  apps : [{
    name: 'commuter',
script: '/usr/local/nodejs-binary-8.15.0/lib/node_modules/@nteract/commuter/lib/index.js',
    instances: 1,
    autorestart: true,
    watch: true,
    max_memory_restart: '1G',
    env: {
      NODE_ENV: 'development'
    },
    env_production: {
      NODE_ENV: 'production',
      
      COMMUTER_STORAGE_BACKEND: 'local',
      COMMUTER_PORT: '80',
      COMMUTER_LOCAL_STORAGE_BASEDIRECTORY: "/root/notebooks/"
    }
  }]
};

@taniki
Copy link
Contributor

taniki commented Feb 27, 2019

@weldpua2008 you should try with current master branch instead of npm package. That what I am doing.

@romeran
Copy link

romeran commented Mar 21, 2019

Hi @rgbkrk, any news?

@captainsafia
Copy link
Member

Hello folks!

I was able to reproduce this on my local machine in commuter v.5.7.0. I've publish a new minor version of commuter (5.8.0) that resolves this issue on my machine. Upgrading to this new minor version should resolve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants