Module parse failed: Unexpected token (39:8) You may need an appropriate loader to handle this file type
ChrisChan888 opened this issue · 4 comments
ChrisChan888 commented
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
It is just a typescript loader. Are you using grunt? To build:
npm install
npm install -g grunt-cli
grunt
AaronDavidNewman commented
I should also mention that you might want to just pull the latest from Github. My NPM packages lag a little bit.
ChrisChan888 commented
I'm using nextjs.
ChrisChan888 commented
I solve it with adding ts-loader in next.config.ts