vercel-builder: Error: Can not read tsconfig.json

Hi.

Error when trying to deploy with Now

Error: Error: Can not read tsconfig.json from /zeit/76c49dc
    at Object.prepareTypescriptEnvironment (/zeit/350a8cf112e00538/.build-utils/.builder/node_modules/@nuxtjs/now-builder/lib/typescript.js:20:19)

https://github.com/JHyeok/jaebook-client/tree/now-sh

source has tsconfig.json.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 4
  • Comments: 20 (7 by maintainers)

Commits related to this issue

Most upvoted comments

@wobsoriano Looks like you have a trailing comma in that JSON.

@phischdev Make sure your tsconfig.json is valid (e.g. no comments), for me it fixed the issue. In my tsconfig.json I had a comment in the first line for some reason. I removed it and the build succeeded.

I hope it helps 😉

same error.

Don’t use this with Nuxt 3 - there is a much better, built-in solution for deploying to Vercel!

same here with nuxt 3 @danielroe

<html>
<body>
<!--StartFragment-->

Error: Can not read tsconfig.json from /vercel/path0
--
14:49:43.003 | at readAndMergeOptions (/vercel/1b4eb0aaa3f98cdd/.build-utils/.builder/node_modules/@nuxtjs/vercel-builder/lib/index.js:193:13)
14:49:43.004 | at async getTypescriptCompilerOptions (/vercel/1b4eb0aaa3f98cdd/.build-utils/.builder/node_modules/@nuxtjs/vercel-builder/lib/index.js:207:15)
14:49:43.004 | at async compileTypescriptBuildFiles (/vercel/1b4eb0aaa3f98cdd/.build-utils/.builder/node_modules/@nuxtjs/vercel-builder/lib/index.js:219:27)
14:49:43.004 | at async Object.build (/vercel/1b4eb0aaa3f98cdd/.build-utils/.builder/node_modules/@nuxtjs/vercel-builder/lib/index.js:334:31)

<!--EndFragment-->
</body>
</html>