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

"type": "module" in package.json throws an error #784

Closed
guybedford opened this issue Apr 21, 2019 · 3 comments
Closed

"type": "module" in package.json throws an error #784

guybedford opened this issue Apr 21, 2019 · 3 comments
Labels

Comments

@guybedford
Copy link

I'm running the SystemJS tests with mocha -b -r esm, where the package.json of SystemJS didn't previously have "type": "module" set. The tests are located in test/*.js.

As soon as I added "type": "module" to the package, I get the error:

/home/guybedford/Projects/systemjs/test/import-map.js:1
import './fixtures/tracing.js';
       ^

SyntaxError: Unexpected string
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)

Setting "mode": "all" or "use module" doesn't seem to fix this either.

Any help would be much appreciated.

@jdalton
Copy link
Member

jdalton commented Apr 24, 2019

You caught me with partial supported added.
I'll revert the partial type support until I can better support it fully.

@jdalton jdalton added bug and removed question labels Apr 24, 2019
@guybedford
Copy link
Author

Thanks, yeah as long as it doesn't throw I'd be happy :)

@mhofman
Copy link

mhofman commented May 3, 2019

Any chance to get a release with this fix?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

3 participants