-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
SyntaxError: Unexpected identifier #42
Comments
+1 |
2 similar comments
+1 |
+1 |
It appears that if you update the summary.js file to use 'require' instead of 'import' it works fine. |
@jbrooksuk Seems like the repo's Bump patch version in package.json then If not, @guy16510 's suggestion works. |
To expand on this for anyone still struggling, if you still can't make progress after @corysimmons suggestion then you need to navigate to your projects root folder then -> node_modules -> node-summary -> lib -> summary.js Replace the first 3 lines with the following: Note: There are other ways to accomplish the same but in essence with the current stable Node release you would want to use require instead of import |
can we get a fixed release on npm pls? |
Hello @jbrooksuk , would you consider perhaps a minor 1.2.1 release? node-summary does not work when ES6 syntax is used, const SummaryTool = require('node-summary')
project/node_modules/node-summary/lib/summary.js:1
(function (exports, require, module, __filename, __dirname) { import _ from 'lodash'
^
SyntaxError: Unexpected identifier |
Can this fix plz plz be pushed to npm |
/Users/sushant/Desktop/summarize/node_modules/node-summary/lib/summary.js:1
(function (exports, require, module, __filename, __dirname) { import _ from 'lodash'
^
SyntaxError: Unexpected identifier
fix for this?
The text was updated successfully, but these errors were encountered: