stewie1570/JSONCasing

Unable to import JSONCasing

Closed this issue · 2 comments

I'm unable to import this module into my program. I ran npm i json-casing to install the module, then opened up a new project in WebStorm, and created a new file.

When using the example provided in the Readme:
import { JSONCasing } from 'json-casing';

I get the following error:
(function (exports, require, module, __filename, __dirname) { import JSONCasing from 'json-casing;
^^^^^^^^^^

SyntaxError: Unexpected identifier

Am I missing something about your example?

Sorry, I didn't see this issue until just now. I installed this package in a nearly empty application (an empty create-react-app) and it worked. I was able to import using that exact import statement and I was able to use it.

I'm using node 8.1.2 & npm 6.1.0.
What versions are you using?
Have you successfully installed and imported other npm packages in your project?
When importing other packages are you using the es6 import syntax or require syntax?

Unable to reproduce this issue & the package has been re-created with TS now... So, I'm closing for now but if anyone sees this issue again, please do report.