I recently launched a brand-new [email protected] project using the
remix-run/remix/templates/vite-express
template after executing this command:
npx create-remix@latest --template remix-run/remix/templates/vite-express
However, upon trying to run the app in dev
mode, I encountered an error message:
[tsconfig-paths] An error occurred while parsing "/Users/username/.vscode/extensions/ms-vscode-remote.remote-containers-0.338.1/dev-containers-user-cli/test/tsconfig.json". See below for details.
TSConfckParseError: failed to resolve "extends":"../../tsconfig.base.json" in /Users/username/.vscode/extensions/ms-vscode-remote.remote-containers-0.338.1/dev-containers-user-cli/test/tsconfig.json
at resolveExtends (file:///Users/username/my-remix-project/node_modules/tsconfck/src/parse.js:251:8)
at parseExtends (file:///Users/username/my-remix-project/node_modules/tsconfck/src/parse.js:186:24)
... 5 lines matching cause stack trace ...
at async _createServer (file:///Users/username/my-remix-project/node_modules/vite/dist/node/chunks/dep-stQc5rCc.js:64225:20)
at async file:///Users/username/my-remix-project/server.js:12:7 {
code: 'EXTENDS_RESOLVE',
cause: Error: Cannot find module '../../tsconfig.base.json'
Require stack:
- /Users/username/.vscode/extensions/ms-vscode-remote.remote-containers-0.338.1/dev-containers-user-cli/test/tsconfig.json
at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
// More stack trace information
The content of vite.config.ts
is as follows:
import { vitePlugin as remix } from "@remix-run/dev";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
export default defineConfig({
plugins: [remix(), tsconfigPaths()],
});
This is the structure of my tsconfig.json
file:
{
"include": ["env.d.ts", "**/*.ts", "**/*.tsx"],
// Remaining content of tsconfig.json file
I am puzzled as to why vite-tsconfig-paths
attempts to import all tsconfig.json
files located in /Users/username
. Any insights on this issue?