sjmc11 / tourguide-js

TourGuide is a Javascript library for creating user tours and on-boarding steps for your apps.
https://tourguidejs.com
MIT License
616 stars 31 forks source link

Babel Error #23

Closed reo-yamashita closed 11 months ago

reo-yamashita commented 11 months ago

Nextjs14 and pnpm got babel error.

  ⨯ ../../node_modules/.pnpm/@sjmc11+tourguidejs@0.0.10/node_modules/@sjmc11/tourguidejs/src/Tour.ts
Module parse failed: Unexpected token (37:13)
: You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
 |      * Primary elements
 |      */
 >     backdrop : HTMLElement
 |     dialog : HTMLElement
| 
 Import trace for requested module:../../node_modules/.pnpm/@sjmc11+tourguidejs@0.0.10/node_modules/@sjmc11/tourguidejs/src/Tour.ts
./src/utils/tourguide.tsx
sjmc11 commented 11 months ago

Hi @jmanos - this could possibly be down to babel or webpack configuration.

I suggest making sure TypeScript and babel-loader are installed in your project & your babel config includes the typescript preset:

{ "presets": ["@babel/preset-env", "@babel/preset-typescript"] }

If it's not that or webpack config related, re-open this issue & I will look into it further. Thanks