binary-person / rammerhead

User friendly web proxy powered by testcafe-hammerhead
239 stars 1.8k forks source link

attempted to run it on replit #2

Closed NotSorena closed 2 years ago

NotSorena commented 2 years ago
npm start

> rammerhead@1.1.3 start /home/runner/Rammerhead
> node src/server.js

About to throw: Unexpected token '.'
/home/runner/Rammerhead/src/util/addUrlShuffling.js:69
        disableShuffling = pattern.urlAttr?.toLowerCase() === 'action';
                                           ^

SyntaxError: Unexpected token '.'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/home/runner/Rammerhead/src/classes/RammerheadProxy.js:17:1)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/home/runner/Rammerhead/src/server/index.js:4:25)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
npm ERR! code ELIFECYCLE
npm ERR! errno 7
npm ERR! rammerhead@1.1.3 start: `node src/server.js`
npm ERR! Exit status 7
npm ERR! 
npm ERR! Failed at the rammerhead@1.1.3 start 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/runner/.npm/_logs/2022-03-27T18_56_36_867Z-debug.log
exit status 7
illusionTBA commented 2 years ago

add this to your .replit file language = "nodejs" run = """ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash export NVM_DIR=\"$HOME/.nvm\" [ -s \"$NVM_DIR/nvm.sh\" ] && \\. \"$NVM_DIR/nvm.sh\" [ -s \"$NVM_DIR/bash_completion\" ] && \\.\"$NVM_DIR/bash_completion\" nvm install 16 npm run bstart """

NotSorena commented 2 years ago

@illusionTBA heres what i got

Error: Cannot find module '/home/runner/Rammerhead/index.js'
Require stack:
- /nix/store/mviq50cwhsyjjiq33g3y89vdg42bkrcv-prybar-nodejs-0.0.0-fc9ff1e/prybar_assets/nodejs/module-context-hook.js
- /tmp/prybar-nodejs-3703528922.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
    at Function.resolve (internal/modules/cjs/helpers.js:80:19)
Hint: hit control+c anytime to enter REPL.