Issue
In my localhost when I execute npm run build
everything is ok, but in my Gitlab pipeline I have a syntax error.
The Gitlab pipeline was ok before I downgrade react-scripts
from 5.*.* to 4.*.*
Now I have the following error:
Syntax error: Missing semicolon. (7:8)
5 |
6 | type BigInt = number;
> 7 | declare const BigInt: typeof Number;
I don't know very much about typescript.
Maybe I have a global configuration on my dev env who is now required by react-scripts 4.*.*
Solution
This is a problem with the eslint configuration.
I don't know why it's different between my local and the Gitlab pipeline.
I added the file in my package.json to be ignored by eslint:
{
"name": "my-app",
"version": "0.1.0",
"eslintIgnore": ["src/components/Grid/index.tsx"]
}
Answered By - Paul
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.