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

Typescript error preventing the application from starting. #1536

Closed
naeemakram opened this issue Apr 1, 2024 · 5 comments
Closed

Typescript error preventing the application from starting. #1536

naeemakram opened this issue Apr 1, 2024 · 5 comments

Comments

@naeemakram
Copy link

I've tried multiple times and getting a Typescript error while starting the application. Please see the error below.
image

@MikeMcC399
Copy link
Contributor

@naeemakram

  • What is your operating system? Windows x?
  • Which version of Node.js are you using? 20.11.0
  • Which command did you run? yarn dev?
  • Have you modified your clone of the example repo https://github.com/cypress-io/cypress-realworld-app and / or installed any different versions of dependencies?

I am not seeing any errors on Windows 11 with Node.js 20.11.0

git clone https://github.com/cypress-io/cypress-realworld-app
cd cypress-realworld-app
npm install yarn@latest -g
yarn
yarn dev

@MikeMcC399
Copy link
Contributor

This is the normal log of yarn dev on Windows 11:

$ yarn dev
yarn run v1.22.19
$ yarn db:seed:dev
$ yarn predev:cognito:ci
$ yarn copy:mock:awsexports && yarn copy:mock:awsexportses5
$ ncp scripts/mock-aws-exports.js src/aws-exports.js
$ ncp scripts/mock-aws-exports-es5.js aws-exports-es5.js
$ ncp ./data/database-seed.json ./data/database.json
$ cross-env NODE_ENV=development concurrently yarn:start:react yarn:start:api:watch
$ nodemon --exec yarn tsnode --watch 'backend' backend/app.ts
$ vite:react]
[start:api:watch] [nodemon] 2.0.22
[start:api:watch] [nodemon] to restart at any time, enter `rs`
[start:api:watch] [nodemon] watching path(s): 'backend'
[start:api:watch] [nodemon] watching extensions: ts,json
[start:api:watch] [nodemon] starting `yarn tsnode backend/app.ts`
$ nyc --silent ts-node -P tsconfig.tsnode.json backend/app.ts
[start:react]
[start:react]   VITE v4.4.2  ready in 3938 ms
[start:react]
[start:react]   ➜  Local:   http://localhost:3000/
[start:react]   ➜  Network: use --host to expose
[start:api:watch] Browserslist: caniuse-lite is outdated. Please run:
[start:api:watch]   npx update-browserslist-db@latest
[start:api:watch]   Why you should do it regularly: https://github.com/browserslist/update-db#readme
[start:api:watch] express-validator: sanitize(), sanitizeBody() and other sanitization-only middlewares have been deprecated.
[start:api:watch] Please use check(), body() and others instead, which must offer the same API, and more.
[start:api:watch] Backend server running at http://localhost:3001

@naeemakram
Copy link
Author

I have the following:
Windows 11
Node 18.13.0
Yar 1.22.22

Yes, I ran Yarn dev command. I cloned the repo from Git.

@MikeMcC399
Copy link
Contributor

@naeemakram

You say you are using Node.js 18.13.0. The README says:

This project requires Node.js to be installed on your machine. Refer to the .node-version file for the exact version.

so you should update Node.js to the requested version. I don't know if that will resolve your issue though as I am not able to reproduce it. Good luck!

@jennifer-shehane
Copy link
Member

Closing as stale

@jennifer-shehane jennifer-shehane closed this as not planned Won't fix, can't repro, duplicate, stale Apr 25, 2024
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

3 participants