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

AppVeyor fails running tests for cli/index.js due to missing transpiling of make-dir module #979

tpiekarski opened this issue Jun 22, 2019 · 1 comment


Copy link

@tpiekarski tpiekarski commented Jun 22, 2019

After opening one PR (#978) here I encountered, that AppVeyor fails running the test for cli/index.js with following message.

FAIL tests/cli/index.js
● Test suite failed to run
Jest encountered an unexpected token
This usually means that you are trying to import a file which Jest cannot parse, e.g. it's not plain JavaScript.
By default, if Jest sees a Babel config, it will use that to transform your files, ignoring "node_modules".
Here's what you can do:
• To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
• If you need a custom transformation specify a "transform" option in your config.
• If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.
You'll find more details and examples of these config options in the docs:
SyntaxError: Unexpected token ...
at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:471:17)
at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:513:25)
at Object. (node_modules/temp-write/index.js:6:17)

It did not think it would have something to do with my PR. So I created a project at AppVeyor with my fork of this repository to check if master is still building there. But the same error like with the mentioned PR occurred.

Logs from the build of master from my fork at AppVeyor:

tpiekarski added a commit to tpiekarski/json-server that referenced this issue Jun 29, 2019

This comment has been minimized.

Copy link
Contributor Author

@tpiekarski tpiekarski commented Jun 29, 2019

After some tests, I discovered that AppVeyor was still using version 7 and not 8 of Node. With bumping this version the tests from cli/index.js are running and are green again. So no transformIgnorePatterns for jest :)

@typicode typicode closed this in 5c0331d Jun 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.