Create a .env with the following and fill in your values:
NEXT_PUBLIC_SENTRY_SERVER_ROOT_DIR="/Users/<path>/<to>/with-typescript-eslint-jest/"
NEXT_PUBLIC_APP_STAGE=production
NEXT_PUBLIC_SENTRY_DSN="<DSN>"
SENTRY_ORG=<ORG>
SENTRY_PROJECT=<PROJECT>
SENTRY_AUTH_TOKEN=<TOKEN>
Don't forget NEXT_PUBLIC_SENTRY_SERVER_ROOT_DIR ^
yarn install
yarn build
yarn start
-
Client error - Click the 'Test' button
-
Node error - Go to localhost:3000/api/sentry?error=1
Bootstrap a developer-friendly NextJS app configured with:
- Typescript
- Linting with ESLint
- Formatting with Prettier
- Linting, typechecking and formatting on by default using
husky
for commit hooks - Testing with Jest and
react-testing-library
Deploy the example using Vercel:
Execute create-next-app
with npm or Yarn to bootstrap the example:
npx create-next-app --example with-typescript-eslint-jest with-typescript-eslint-jest-app
# or
yarn create next-app --example with-typescript-eslint-jest with-typescript-eslint-jest-app
Deploy it to the cloud with Vercel (Documentation).