AaronDavidNewman / Smoosic

A music notation editor written in javascript
Other
95 stars 14 forks source link

Module parse failed: Unexpected token (39:8) You may need an appropriate loader to handle this file type #84

Closed ChrisChan888 closed 1 year ago

ChrisChan888 commented 1 year ago

Which loader should I use for solve this error?

Module parse failed: Unexpected token (39:8)
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
| import { SuiHelp } from '../ui/help';
| 
> declare var $: any;
| 
| interface pairType { [key: string]: string }

Import trace for requested module:
./node_modules/smoosic/src/application/application.ts
AaronDavidNewman commented 1 year ago

It is just a typescript loader. Are you using grunt? To build:

npm install
npm install -g grunt-cli
grunt
AaronDavidNewman commented 1 year ago

I should also mention that you might want to just pull the latest from Github. My NPM packages lag a little bit.

ChrisChan888 commented 1 year ago

I'm using nextjs.

ChrisChan888 commented 1 year ago

I solve it with adding ts-loader in next.config.ts