Typescript compilation error `SyntaxError: Unexpected token '.'` (yaml: "^2.0.1")
See original GitHub issueDescribe 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.
- Add yaml
^2.0.1
to package.json - Build with yarn
- 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
- Environment: [e.g. Node.js 14.7.0 or Chrome 87.0] https://github.com/Moon1706/actions/blob/master/package.json
Additional context Add any other context about the problem here.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
Closing this, as there’s no action on the
yaml
side and it looks like the upstream fixes have been merged as well.