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

Unrecognised value [es6] when using module: "es6" #192

Closed
pietschy opened this issue Feb 12, 2017 · 5 comments
Closed

Unrecognised value [es6] when using module: "es6" #192

pietschy opened this issue Feb 12, 2017 · 5 comments

Comments

@pietschy
Copy link

pietschy commented Feb 12, 2017

Hi there,

I'm trying to get rollup working with my code base as per microsoft/TypeScript#6319 but I'm getting Unrecognised value [es6]. Using module:"system" builds fine, but I don't get the Fully-optimized - entire tree built via Rollup static optimization message at end of the jspm build process and the resulting file is huge.

I'm using version 6.0.5 of the plugin and typescript 2.2.0 (although the plugin seems to be installing [email protected] as well).

Edit: I'm also using:
[email protected]
[email protected]

Any help would be greatly appreciated.

@aluanhaddad
Copy link
Contributor

You need to use "module": "es2015" instead of "module": "es6" in your tsconfig.json or typescriptOptions.

As for the multiple versions of TypeScript, they are being installed because the plugin depends on one of them and you, or one of your dependencies has installed the other. The best way to resolve this is install with an override like so

jspm i --dev plugin-typescript -o "{ dependencies: { typescript: '2.2.0'} }"

Another options is to use

jspm resolve --only npm:[email protected]

this forces all packages that depend on typescript to use the indicated version.

@pietschy
Copy link
Author

Thanks @aluanhaddad, that worked perfectly.

Just in case others come across this the versions I've specified above seem to have broken other things in our setup (sourcemaps and the text plugin) so I've since gone back to [email protected]. But the module type and resolving to [email protected] have worked fine.

@aluanhaddad
Copy link
Contributor

Just FYI, it is growing pains of the upgrade from [email protected] -> [email protected] that is causing certain issues. [email protected] uses [email protected] and has some nice improvements over [email protected] including some TypeScript specific stuff.

@frankwallis
Copy link
Owner

Thanks for resolving this, I have updated the plugin to specify typescript as a peerDependency which I hope will help situations like this.

@aluanhaddad
Copy link
Contributor

@frankwallis ah that explains why my overrides stopped working.

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

No branches or pull requests

3 participants