Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fix: tsconfig.json for building on darwin #644

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hsjobeki
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant