Skip to content

Unknown compiler option 'allowImportingTsExtensions' Argument for '--moduleResolution' option must be: 'node', 'classic'. #58

Description

@sammcj

I went to try out the project and there's two errors:

  1. Unknown compiler option 'allowImportingTsExtensions'
  2. Argument for '--moduleResolution' option must be: 'node', 'classic'.

I downgraded node to the version recommended in the .nvmrc (20.5.0) thinking perhaps it was relying on deprecated functionality but that didn't help.

$ node --version
v20.5.0

$ pnpm i
...(packages installed here)

$ pnpm dev

> aident.ai@0.1.0 dev /Users/samm/git/open-cuak
> npm run envs:pull && npm run supabase:storage:init && npm run supabase:mock-user:init && npx turbo dev --concurrency 20

npm warn Unknown env config "_owner-registry". This will stop working in the next major version of npm.

> aident.ai@0.1.0 envs:pull
> sh ./scripts/pull-envs-for-all-packages.sh

✅ .env.local already exists
✅ .env.production already exists
Reading default server configuration from example files...
Found default local values:
- SERVER_HOSTNAME='localhost'
- SERVER_HOST_PORT='3000'
- SERVER_HOST_PROTOCOL='http'
Found default production values:
- SERVER_HOSTNAME='localhost'
- SERVER_HOST_PORT='11970'
- SERVER_HOST_PROTOCOL='http'
Set SERVER_HOSTNAME='localhost' in .env.local
Set SERVER_HOST_PORT='3000' in .env.local
Set SERVER_HOST_PROTOCOL='http' in .env.local
Set SERVER_HOSTNAME='localhost' in .env.production
Set SERVER_HOST_PORT='11970' in .env.production
Set SERVER_HOST_PROTOCOL='http' in .env.production

Processing .env.local...
Found server configuration in .env.local:
- SERVER_HOSTNAME='localhost'
- SERVER_HOST_PORT='3000'
- SERVER_HOST_PROTOCOL='http'
Using protocol from SERVER_HOST_PROTOCOL: http://
Adding port 3000 to hostname
Setting NEXT_PUBLIC_ORIGIN=http://localhost:3000 in .env.local
✅ Updated .env.local with server configuration

Processing .env.production...
Found server configuration in .env.production:
- SERVER_HOSTNAME='localhost'
- SERVER_HOST_PORT='11970'
- SERVER_HOST_PROTOCOL='http'
Using protocol from SERVER_HOST_PROTOCOL: http://
Adding port 11970 to hostname
Setting NEXT_PUBLIC_ORIGIN=http://localhost:11970 in .env.production
✅ Updated .env.production with server configuration
Copying env files to all packages...
✅ /apps/web
✅ /apps/extension
✅ /apps/browserless
Success! Done copying env files to all packages.
npm warn Unknown env config "_owner-registry". This will stop working in the next major version of npm.

> aident.ai@0.1.0 supabase:storage:init
> npm run web:run-script -- ./scripts/init/register-local-storage-buckets.ts

npm warn Unknown env config "_owner-registry". This will stop working in the next major version of npm.

> aident.ai@0.1.0 web:run-script
> cd apps/web && TS_NODE_PROJECT=./tsconfig.json npx ts-node -r tsconfig-paths/register ./scripts/init/register-local-storage-buckets.ts

npm warn Unknown env config "_owner-registry". This will stop working in the next major version of npm.
/Users/samm/.npm/_npx/1bf7c3c15bf47d04/node_modules/ts-node/src/index.ts:859
    return new TSError(diagnosticText, diagnosticCodes, diagnostics);
           ^
TSError: ⨯ Unable to compile TypeScript:
error TS5023: Unknown compiler option 'allowImportingTsExtensions'.
error TS6046: Argument for '--moduleResolution' option must be: 'node', 'classic'.

    at createTSError (/Users/samm/.npm/_npx/1bf7c3c15bf47d04/node_modules/ts-node/src/index.ts:859:12)
    at reportTSError (/Users/samm/.npm/_npx/1bf7c3c15bf47d04/node_modules/ts-node/src/index.ts:863:19)
    at createFromPreloadedConfig (/Users/samm/.npm/_npx/1bf7c3c15bf47d04/node_modules/ts-node/src/index.ts:874:36)
    at phase4 (/Users/samm/.npm/_npx/1bf7c3c15bf47d04/node_modules/ts-node/src/bin.ts:543:44)
    at bootstrap (/Users/samm/.npm/_npx/1bf7c3c15bf47d04/node_modules/ts-node/src/bin.ts:95:10)
    at main (/Users/samm/.npm/_npx/1bf7c3c15bf47d04/node_modules/ts-node/src/bin.ts:55:10)
    at Object.<anonymous> (/Users/samm/.npm/_npx/1bf7c3c15bf47d04/node_modules/ts-node/src/bin.ts:800:3)
    at Module._compile (node:internal/modules/cjs/loader:1554:14)
    at Object..js (node:internal/modules/cjs/loader:1706:10)
    at Module.load (node:internal/modules/cjs/loader:1289:32) {
  diagnosticCodes: [ 5023, 6046 ]
}
 ELIFECYCLE  Command failed with exit code 1.

Neat project by the way!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions