question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Typescript compilation error `SyntaxError: Unexpected token '.'` (yaml: "^2.0.1")

See original GitHub issue

Describe the bug Hi guys! I was contributing to Pulumi GitHub action, when found this bug. I’ve developed a new feature in the middle of the April and all was okay. But the owner of the repo checked my code only a 2 months later, and we got this error. When I got back from ^2.0.1 to 2.0.1 trouble is disappeared. Could you check this?

To Reproduce Steps to reproduce the behaviour.

  1. Add yaml ^2.0.1 to package.json
  2. Build with yarn
  3. Profit https://github.com/pulumi/actions/tree/982ee41fcc25609042a89cf6043af498a30146e8 https://github.com/Moon1706/actions/runs/6825643139?check_suite_focus=true

Expected behaviour A clear and concise description of what you expected to happen. I expected this behavior.

Versions (please complete the following information): yaml: 2.1.1 node-version: 14.x

Additional context Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
evilaliv3commented, Jul 4, 2022

That was fast, thank you @raineorshine for your feedback!

Actually updating to node 16.15.1 and npm 8.1.0 solved the issue for us.

0reactions
eemelicommented, Aug 3, 2022

Closing this, as there’s no action on the yaml side and it looks like the upstream fixes have been merged as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeScript, SyntaxError: Unexpected token { - Stack Overflow
It seems like if vscode doesn't find a matching file, it just attempts to run the ts file via node (which explains the...
Read more >
CoffeeScript
Compile a .coffee script into a .js JavaScript file of the same name. -t, --transpile, Pipe the CoffeeScript compiler's ...
Read more >
typescript syntaxerror: unexpected token 'export' - You.com
So the dependency in node_modules folder exports a function using ES6 import/export module. The code will throw error when it running in browser...
Read more >
how to make npm typescript package globally Code Example
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports.
Read more >
Bug listing with status RESOLVED with resolution OBSOLETE ...
link178.res:292:8: syntax error, unexpected STRING)" status:RESOLVED ... yaml editing is slow" status:RESOLVED resolution:OBSOLETE severity:normal ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found