Skip to content

Fix: tsconfig.json for building on darwin #644

New issue

Have a question about this project? Sign up for a free account to open an issue and contact its maintainers and the community.

By clicking “Sign up for ”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on ? Sign in to your account

Merged
merged 1 commit into from
Jan 14, 2025
Merged

Conversation

hsjobeki
Copy link
Contributor

This adds: forceConsistentCasingInFileNames: false.

File system casing on darwin machines behaves differently from windows or linux which causes the follwing problem.

> [email protected] build
> npm run lint && npm run clean && npm run build:browser && npm run build:server


> [email protected] lint
> eslint src/*.ts test/*.ts


> [email protected] clean
> shx rm -rf dist && mkdir dist


> [email protected] build:browser
> browserify src/index.ts -s jstt -p tsify > dist/bundle.js

TypeScript error: /private/tmp/nix-build-json2ts.drv-0/source/src/applyschematyping.ts(1,37): Error TS1261: Already included file name '/private/tmp/nix-build-json2ts.drv-0/source/src/types/JSONSchema.ts' differs from file name '/private/tmp/nix-build-json2ts.drv-0/source/src/types/jsonschema.ts' only in casing.
  The file is in the program because:
    Imported via './types/JSONSchema' from file '/private/tmp/nix-build-json2ts.drv-0/source/src/applyschematyping.ts'
    Imported via './types/JSONSchema' from file '/private/tmp/nix-build-json2ts.drv-0/source/src/applyschematyping.ts'
    Imported via './types/JSONSchema' from file '/private/tmp/nix-build-json2ts.drv-0/source/src/typesOfSchema.ts'
    Imported via './types/JSONSchema' from file '/private/tmp/nix-build-json2ts.drv-0/source/src/utils.ts'
    Imported via './types/JSONSchema' from file '/private/tmp/nix-build-json2ts.drv-0/source/src/normalizer.ts'
    Imported via './types/JSONSchema' from file '/private/tmp/nix-build-json2ts.drv-0/source/src/resolver.ts'
    Imported via './types/JSONSchema' from file '/private/tmp/nix-build-json2ts.drv-0/source/src/parser.ts'
    Imported via './types/JSONSchema' from file '/private/tmp/nix-build-json2ts.drv-0/source/src/parser.ts'
    Imported via './types/JSONSchema' from file '/private/tmp/nix-build-json2ts.drv-0/source/src/validator.ts'
    Imported via './types/JSONSchema' from file '/private/tmp/nix-build-json2ts.drv-0/source/src/linker.ts'
    Imported via './types/JSONSchema' from file '/private/tmp/nix-build-json2ts.drv-0/source/src/index.ts'
    Imported via './types/JSONSchema' from file '/private/tmp/nix-build-json2ts.drv-0/source/src/index.ts'
    Root file specified for compilation
    Imported via '../src/types/JSONSchema' from file '/private/tmp/nix-build-json2ts.drv-0/source/test/testLinker.ts'

ERROR: `npm build` failed

@bcherny
Copy link
Owner

Thanks!

@bchernybcherny merged commit ef18aa1 into bcherny:master Jan 14, 2025
18 checks passed
Sign up for free to join this conversation on . Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants