Home > Software engineering >  Error during building swagger in laravel application with vite
Error during building swagger in laravel application with vite

Time:11-25

Get the following error after running npm run build in laravel. If I run npm run dev everything seems to work fine. But in build this error occurs.

rendering chunks (2)...warnings when minifying css:
▲ [WARNING] Expected identifier but found "*" [css-syntax-error]

    <stdin>:1:30219:
      1 │ ...fter{clear:both}.swagger-ui .cf{*zoom:1}.swagger-ui .cl{clear:le...
        ╵          

Following error is shown during loading the swagger page:

Uncaught TypeError: Cannot read properties of undefined (reading 'isRequired') swagger.67892d56.js:162 
 at 1543 (swagger.67892d56.js:162:9585)
    at Ve (swagger.67892d56.js:191:4143)
    at swagger.67892d56.js:193:40222
    at swagger.67892d56.js:193:72778

I am building a laravel application and using swagger for route documentation. In production it works well but during build this error occurs.

CodePudding user response:

Looks like this issue which was fixed in Swagger UI v. 4.15.3. Update your app to use the latest version of Swagger UI.

  • Related