Skip to content
This repository has been archived by the owner on Aug 13, 2024. It is now read-only.

Error using moduleResolution = 'node' in tsconfig file #345

Open
diogosantana opened this issue Jan 17, 2017 · 1 comment · May be fixed by #346
Open

Error using moduleResolution = 'node' in tsconfig file #345

diogosantana opened this issue Jan 17, 2017 · 1 comment · May be fixed by #346
Assignees

Comments

@diogosantana
Copy link
Contributor

The build fails after select 'Use tsconfig' preference for tsconfig like this:

{ "compilerOptions": { "target": "es5", "module": "commonjs", "moduleResolution": "node", "sourceMap": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, "lib": [ "es2015", "dom" ], "noImplicitAny": true, "suppressImplicitAnyIndexErrors": true } }

Exception:

java.lang.IllegalArgumentException: No enum constant com.palantir.typescript.services.language.ModuleResolutionKind.NODE at java.lang.Enum.valueOf(Unknown Source) at com.palantir.typescript.services.language.ModuleResolutionKind.valueOf(ModuleResolutionKind.java:1) at com.palantir.typescript.services.language.CompilerOptions.fromProject(CompilerOptions.java:207) at com.palantir.typescript.services.language.LanguageEndpoint.initializeProjectTree(LanguageEndpoint.java:318) at com.palantir.typescript.services.language.LanguageEndpoint.initializeProject(LanguageEndpoint.java:77) at com.palantir.typescript.TypeScriptBuilder.startupOnInitialize(TypeScriptBuilder.java:119) at org.eclipse.core.internal.events.BuildManager.getBuilder(BuildManager.java:550) at org.eclipse.core.internal.events.BuildManager.getRule(BuildManager.java:1145) at org.eclipse.core.internal.resources.Project$1.run(Project.java:545) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240) at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:529) at org.eclipse.core.internal.resources.Project.build(Project.java:120) at com.palantir.typescript.Builders$1.run(Builders.java:102) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

The ModuleResolutionKind enum accepts CLASSIC and NODE_JS, while typescript's compiler accepts
"Classic" or "Node" (https://www.typescriptlang.org/docs/handbook/compiler-options.html).

@sixinli
Copy link
Collaborator

sixinli commented Jan 18, 2017

will take a look if we can just swap that to "node" in a bit :)

@sixinli sixinli self-assigned this Jan 18, 2017
@sixinli sixinli linked a pull request Jan 20, 2017 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants