Skip to content

tailwindViewer not working #235

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

Closed
emilsgulbis opened this issue Dec 17, 2020 · 6 comments · Fixed by #236
Closed

tailwindViewer not working #235

emilsgulbis opened this issue Dec 17, 2020 · 6 comments · Fixed by #236
Labels
bug Something isn't working

Comments

@emilsgulbis
Copy link

Version

nuxt: 2.14.7,
@nuxtjs/tailwindcss: 3.4.0

Reproduction Link

https://codesandbox.io/s/young-dawn-6s5r5

Steps to reproduce

Install latest @nuxtjs/tailwindcss

What is Expected?

/_tailwind to show tailwindViewer page

What is actually happening?

Throws error: Unexpected token {
On local machine: Cannot use import statement outside a module

@emilsgulbis emilsgulbis added the bug Something isn't working label Dec 17, 2020
@shealan
Copy link

shealan commented Dec 17, 2020

I don't see the unexpected token bit, but I am getting the same "Cannot use import statement outside a module" error on Nuxt 2.14.12 and @nuxtjs/tailwindcss 3.4.0

@ttkoma
Copy link

ttkoma commented Dec 17, 2020

Same issue. Im attach stack
image

@reslear
Copy link

reslear commented Dec 17, 2020

@ttkoma @shealan @emilsgulbis you are not alone
ping respected @atinux look that problem please)

  • npm 6.14.9
  • ts
  • nuxt 2.14.12

Снимок экрана 2020-12-18 в 02 28 23

@pi0
Copy link
Contributor

pi0 commented Dec 17, 2020

It seems an issue with esm package resolving serverMiddleware. @reslear meanwhile would you please try setting createRequire: 'jiti' option in nuxt.config?

@reslear
Copy link

reslear commented Dec 18, 2020

#235 (comment) respected @pi0 very thx for fast answering )

sorry but, this option show same errors

i cleaned node_modules package-lock and .cache (unjs/jiti#9)
install you interest pkg jiti and set createRequire: 'jiti' on nuxt.config.ts

more info

  • node v12.16.3
  • @nuxt/typescript-runtime 2.0.0

exist other solutions or it better wait merging your fast fix #236 ?

@franco-chan
Copy link

Same here...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants