I'm trying to try supertokens, but get this from t...
# support-questions-legacy
r
I'm trying to try supertokens, but get this from the get-go:
Copy code
snafu$ npx create-supertokens-app@latest
Need to install the following packages:
  create-supertokens-app@latest
Ok to proceed? (y) 
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'ansi-escapes@6.0.0',
npm WARN EBADENGINE   required: { node: '>=14.16' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'figures@5.0.0',
npm WARN EBADENGINE   required: { node: '>=14' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'type-fest@3.1.0',
npm WARN EBADENGINE   required: { node: '>=14.16' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
file:///home/reece/.npm/_npx/bf3a85bce9cfe559/node_modules/create-supertokens-app/lib/build/index.js:160
            frontend: answers?.frontend ?? "",
                              ^

SyntaxError: Unexpected token '.'
    at Loader.moduleStrategy (internal/modules/esm/translators.js:133:18)
    at async link (internal/modules/esm/module_job.js:42:21)
n
Hi @reece_hart The CLI required node 14 as a minimum, seems like you are using node 12
r
Indeed, v12.22.9. Thanks
n
Happy to help
r
That worked, but a new issue...
Copy code
? What is your app called? my-app
? Choose a frontend framework (Visit our documentation for integration with other frameworks): Vue.js
? Choose a backend framework (Visit our documentation for integration with other frameworks): Python (FastAPI)
? What type of authentication do you want to use? Social Login + Email Password
Then,
Copy code
snafu$ npm run start

> my-app@0.0.1 start
> npm-run-all --parallel start:frontend start:backend


> my-app@0.0.1 start:backend
> cd backend && pip install virtualenv && virtualenv venv && source venv/bin/activate && pip install -r requirements.txt && python app.py


> my-app@0.0.1 start:frontend
> cd frontend && npm run dev


> vue-prebuilt@0.0.0 dev
> vite

Defaulting to user installation because normal site-packages is not writeable

  VITE v3.2.2  ready in 352 ms

  ➜  Local:   http://localhost:3000/
⋮.
Installing collected packages: distlib, filelock, virtualenv
Successfully installed distlib-0.3.6 filelock-3.8.0 virtualenv-20.16.6
created virtual environment CPython3.10.6.final.0-64 in 187ms
  creator CPython3Posix(dest=/home/reece/my-app/backend/venv, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/reece/.local/share/virtualenv)
    added seed packages: pip==22.3, setuptools==65.5.0, wheel==0.37.1
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
sh: 1: source: not found
ERROR: "start:backend" exited with 127.
And when I run again,
Copy code
➜  Local:   http://localhost:3000/
created virtual environment CPython3.10.6.final.0-64 in 139ms
  creator CPython3Posix(dest=/home/reece/my-app/backend/venv, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/reece/.local/share/virtualenv)
    added seed packages: pip==22.3, setuptools==65.5.0, wheel==0.37.1
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
sh: 1: source: not found
ERROR: "start:backend" exited with 127.
/home/reece/my-app/frontend/node_modules/esbuild/lib/main.js:1113
        return callback(new Error(error), null);
                        ^

Error: The service was stopped: write EPIPE
    at /home/reece/my-app/frontend/node_modules/esbuild/lib/main.js:1113:25
    at responseCallbacks.<computed> (/home/reece/my-app/frontend/node_modules/esbuild/lib/main.js:671:9)
    at afterClose (/home/reece/my-app/frontend/node_modules/esbuild/lib/main.js:661:28)
    at /home/reece/my-app/frontend/node_modules/esbuild/lib/main.js:2050:11
    at onwriteError (node:internal/streams/writable:418:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:84:21)

Node.js v19.0.0
n
What operating system are you using?
r
linux (ubuntu 22.04, stock except for the nodejs upgrade)
n
Hmm can you open an issue about this on the create-supertokens-app repository?
r
It appears that the backend isn't set up correctly. I can activate the venv, then pip install requirements, which clearly had not already been installed. I assume that they're supposed to be.
Sure.
n
The CLI uses source as a command to run it which isn’t installed on your system which is the problem. You can install it separately and then try running the app again to get around this and in the meantime we will fix this
In the package.json inside the folder you can change the start:backend command to ./venv… instead of source venv… and try?
r
I don't think that's it. The error is from sh. source is a command in bash (and other shells), but the equivalent in the stock Bourne shell (sh) is simply
.
. Whoever is issuing the source should either do it in bash or perhaps use
.
.
n
Yep that’s what I meant by this
Thanks again for your help.
7 Views