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

Cause the @nuxt/content *.json file to be unusable #96

Closed
chrislutw opened this issue Jun 8, 2021 · 7 comments
Closed

Cause the @nuxt/content *.json file to be unusable #96

chrislutw opened this issue Jun 8, 2021 · 7 comments

Comments

@chrislutw
Copy link

Describe the bug
Could not parse or query @nuxt/content *.json files

To Reproduce
Steps to reproduce the behavior:

  1. visit https://codesandbox.io/s/nuxt-windi-m65mf
  2. See error

Expected behavior
@nuxt/content .json files can be parse or query

Screenshots
image

Additional context
version:
nuxt: 2.15.14
@nuxt/content: 1.14.0
nuxt/windicss: 1.0.0

@arpadgabor
Copy link

Experiencing the same problem, happens to yaml files too.

Could not parse ./content/sections.yml: can not read a block mapping entry; a multiline key may not be an implicit key (32:1)

 29 | /* windicss layer components */
 30 | 
 31 | /* windicss layer utilities */< ...

@arpadgabor
Copy link

Looking at what the /_content endpoint returns, it seems like windicss appends these lines to the end of a file.

image

@arpadgabor
Copy link

Apparently this line from 1c8021d is not present in the last release.

https://github.com/windicss/nuxt-windicss-module/blob/d762799113c4691bde5c9338f8f600719dd11b54/src/index.ts#L118

Maybe @harlan-zw can help?

@harlan-zw
Copy link
Member

Hey @arpadgabor

Thanks for looking into this bug. Seems like there was a problem with the build for release 1.0.0, can you try with 1.0.3 and let me know if you still have issues

@arpadgabor
Copy link

Hello @harlan-zw ! Yes it does indeed work (1.0.1+), thanks for looking into it!

@chrislutw
Copy link
Author

@arpadgabor @harlan-zw Thanks for help, can use windicss 3.1 new features in my project finally

@harlan-zw
Copy link
Member

Thanks for making the issue @chrislutw and apologies for the delay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants