Here's the beginning of my fuse.ts file
import { CSSPluginOptions } from 'fuse-box/plugins/stylesheet/CSSplugin';
import { argv } from 'yargs';
import * as path from 'path';
import {
CSSPlugin, CSSResourcePlugin, EnvPlugin, FuseBox, QuantumPlugin,
SassPlugin, Sparky, WebIndexPlugin, CopyPlugin, CSSModules
} from 'fuse-box';
import { SparkyFile } from 'fuse-box/sparky/SparkyFile';
import * as fs from 'fs';
const express = require('express');
class SparkyContext
{
I encountered this error message
import { argv } from 'yargs';
^
SyntaxError: Unexpected token {
Initially, the first import statement works fine but then there's an issue with the second one. I tried rearranging some imports and found that most of them yield the same error indicating either * or { is unexpected after the import.
Below is my basic and standard tsconfig.json configuration:
{
"compilerOptions": {
"baseUrl": "./src",
"jsx": "react",
"target": "es5",
"module": "es2015",
"sourceMap": true,
"importHelpers": false,
"removeComments": true,
"moduleResolution": "node",
"lib": ["es2015", "es2015.iterable", "dom"],
"experimentalDecorators": true,
"allowSyntheticDefaultImports" : true
}
}
I'm unsure about the root cause of this issue and where to begin troubleshooting. Interestingly, if I change the statements to require syntax, it does work. It seems like there might be a conflict with the tsconfig.json file. I have checked for any conflicting properties in package.json or other files, but nothing stands out.