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

"SyntaxError: Unexpected token {" with npm-audit-html@1.4.2 #49

Closed
spolom opened this issue Aug 5, 2020 · 6 comments · Fixed by #50
Closed

"SyntaxError: Unexpected token {" with npm-audit-html@1.4.2 #49

spolom opened this issue Aug 5, 2020 · 6 comments · Fixed by #50
Assignees
Labels
bug Something isn't working released

Comments

@spolom
Copy link

spolom commented Aug 5, 2020

The just released 1.4.2 broke our build chain which works just fine with 1.4.1.

[2020-08-05T15:04:00.875Z] + ./node_modules/.bin/npm-audit-html --output target/reports/npm-audit/report.html
[2020-08-05T15:04:00.875Z] /home/jenkins/workspace/foo/node_modules/npm-audit-html/node_modules/fs-extra/lib/mkdirs/make-dir.js:85
[2020-08-05T15:04:00.875Z] } catch {
[2020-08-05T15:04:00.875Z] ^
[2020-08-05T15:04:00.875Z]
[2020-08-05T15:04:00.875Z] SyntaxError: Unexpected token {
[2020-08-05T15:04:00.875Z] at createScript (vm.js:80:10)
[2020-08-05T15:04:00.875Z] at Object.runInThisContext (vm.js:139:10)
[2020-08-05T15:04:00.875Z] at Module._compile (module.js:617:28)
[2020-08-05T15:04:00.875Z] at Object.Module._extensions..js (module.js:664:10)
[2020-08-05T15:04:00.875Z] at Module.load (module.js:566:32)
[2020-08-05T15:04:00.875Z] at tryModuleLoad (module.js:506:12)
[2020-08-05T15:04:00.875Z] at Function.Module._load (module.js:498:3)
[2020-08-05T15:04:00.875Z] at Module.require (module.js:597:17)
[2020-08-05T15:04:00.875Z] at require (internal/module.js:11:18)
[2020-08-05T15:04:00.875Z] at Object. (/home/jenkins/workspace/foo/node_modules/npm-audit-html/node_modules/fs-extra/lib/mkdirs/index.js:3:44)

@spolom
Copy link
Author

spolom commented Aug 5, 2020

Looks like it is related to the upgrade of fs-extra from 8.x to 9.x.

@nprail
Copy link
Member

nprail commented Aug 5, 2020

@spolom What version of Node.js are you using? Since it is a syntax error that you are hitting, I'm guessing that the issue is due to fs-extra requiring Node 10.

Which makes 1.4.2 a breaking release 😬

@nprail
Copy link
Member

nprail commented Aug 5, 2020

chalk 4 also requires Node 10.

@nprail nprail mentioned this issue Aug 5, 2020
@nprail nprail closed this as completed in #50 Aug 5, 2020
@nprail
Copy link
Member

nprail commented Aug 5, 2020

🎉 This issue has been resolved in version 1.4.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@nprail nprail added released bug Something isn't working labels Aug 5, 2020
@nprail nprail self-assigned this Aug 5, 2020
@spolom
Copy link
Author

spolom commented Aug 5, 2020

Thank you for resolving this. 1.4.3 works fine.

I can't tell the Node version, as the audit build step runs on a version that is unknown to me :-|.

@nprail
Copy link
Member

nprail commented Aug 5, 2020

Awesome! Sorry about the accidental breaking change! I really need to add some automated tests with all the supported Node versions so that something like this doesn't happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants