bouzidanas / react-reveal-slides

Create and add reveal.js presentations in react
MIT License
33 stars 1 forks source link

Module parse failed: Unexpected token #8

Open Dave-Forti opened 3 months ago

Dave-Forti commented 3 months ago

I tried using the library in a bare next js app and it won't compile

image

"dependencies": { "next": "14.2.5", "react": "^18", "react-dom": "^18", "react-reveal-slides": "github:bouzidanas/react-reveal-slides", "reveal.js": "^5.1.0" }, "devDependencies": { "@types/node": "^20", "@types/react": "^18", "@types/react-dom": "^18", "@types/reveal.js": "^5.0.3", "eslint": "^8", "eslint-config-next": "14.2.5", "postcss": "^8", "tailwindcss": "^3.4.1", "typescript": "^5" }

bouzidanas commented 3 months ago

This looks like possible a typescript version issue. Your version might not have import type.

You must be on TypeScript 3.8 or more : https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html

It looks like you have a late enough version but you can just try removing the type to see if that works.