Kong / swagger-ui-kong-theme

Plugin theme for Swagger-UI that adds snippets
Apache License 2.0
19 stars 17 forks source link

Cannot `yarn` the demo #147

Open Shard opened 1 year ago

Shard commented 1 year ago

I went to run yarn on the demo folder and ran into an issue with the yarn.lock file:

[mark@mark-pc demo]$ yarn
yarn install v1.22.19
warning package.json: No license field
error An unexpected error occurred: "Invalid number of spaces".
info If you think this is a bug, please open a bug report with the information provided in "/home/mark/userback/swagger-ui-kong-theme/demo/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

From the error yarn-error.log:

Yarn version: 
  1.22.19

Node version: 
  16.14.0

Platform: 
  linux x64

Trace: 
  TypeError: Invalid number of spaces
      at tokenise (/usr/lib/node_modules/yarn/lib/cli.js:63366:17)
      at tokenise.next (<anonymous>)
      at Parser.next (/usr/lib/node_modules/yarn/lib/cli.js:63472:28)
      at Parser.parse (/usr/lib/node_modules/yarn/lib/cli.js:63520:30)
      at Parser.parse (/usr/lib/node_modules/yarn/lib/cli.js:63596:26)
      at Parser.parse (/usr/lib/node_modules/yarn/lib/cli.js:63596:26)
      at parse (/usr/lib/node_modules/yarn/lib/cli.js:63696:21)
      at module.exports.exports.default (/usr/lib/node_modules/yarn/lib/cli.js:63258:96)
      at Function.<anonymous> (/usr/lib/node_modules/yarn/lib/cli.js:3068:63)
      at Generator.next (<anonymous>)

Deleting the yarn.lock fixed the issue for me so it looks like something odd has happened to it.

The issue did not occur on the root project.

Mierenga commented 1 year ago

Hi @Shard, I was unable to reproduce this on macOS with the same yarn version v1.22.19.

Can you compare the original yarn.lock with your newly created one using diff and provide the output?

Shard commented 1 year ago

Hi @Mierenga,

I did a diff but it ended up doing a lot of upgrades so it's a bit difficult to parse. https://gist.github.com/Shard/1128e36dc800285e9ac1072b0ccd3170

Doing some quick searching I couldn't' find any tabs or extra spaces at the end of lines. Not sure of a good way to programmatically search that though.

williamwu062 commented 8 months ago

Hi I am also having the same issue. Just downloaded and tried but demo is not working with same error