We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
.ts
Craco
"scripts": { "test": "craco test",
- run: npm ci - run: npm run api ("scripts": "api": "npx orval --prettier") - run: npm test
GitHub action (npm test) failed with SyntaxError: Cannot use import statement outside a module. The same error using require().
require()
Pass test.
GitHub actions log:
SyntaxError: Cannot use import statement outside a module > 1 | import Axios, { AxiosRequestConfig, AxiosPromise, AxiosError } from 'axios' | ^ 2 | 3 | import { getAuthViaCookies, getRecord } from '../../auth' 4 | at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1728:14) at Object.<anonymous> (src/api/mutator/axios-auth.ts:1:1) at Object.<anonymous> (src/api/endpoints/auth.ts:16:1) at Object.<anonymous> (src/components/LoginForm.tsx:11:1) at Object.<anonymous> (src/App.tsx:9:1) at Object.<anonymous> (src/App.test.tsx:2:1)
Repository with error.
If you need more information, let me know.
Seems related to #223. Axios also have some issues: 5550, 5162.
Operating System: Ubuntu 22.04.1 (GitHub actions) Package Version: Orval 6.12.1 (from 6.11.0)
The text was updated successfully, but these errors were encountered:
Is this still an issue. I use Axios and have never seen this error?
Sorry, something went wrong.
No branches or pull requests
What are the steps to reproduce this issue?
.ts
mutator with Axios importCraco
What happens?
GitHub action (npm test) failed with SyntaxError: Cannot use import statement outside a module.
The same error using
require()
.What were you expecting to happen?
Pass test.
Any logs, error output, etc?
GitHub actions log:
Any other comments?
Repository with error.
If you need more information, let me know.
Seems related to #223.
Axios also have some issues: 5550, 5162.
What versions are you using?
Operating System: Ubuntu 22.04.1 (GitHub actions)
Package Version: Orval 6.12.1 (from 6.11.0)
The text was updated successfully, but these errors were encountered: