Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TS2339: Property '_params' does not exist on type '(Anonymous class)'. #390

Open
tymiao1220 opened this issue Jul 23, 2019 · 0 comments
Open

Comments

@tymiao1220
Copy link
Contributor

I am using npm to install latest version of AMI, and when I import to use them, I got error syntax like TS2339: Property ' ' does not exist on type '(Anonymous class)'. How should I fix that? here is my wepack config:

const path = require('path');
const webpack = require('webpack');
module.exports = {
    mode: 'development',
    entry: './src/main.js',
    output: {
    path: path.resolve(__dirname, './public'),
    filename: 'app.bundle.js'
    },
    resolve: {
        extensions: ['.ts', '.js', '.css', '.html']
    },
    module:{
        rules:[
            {
                test: /\.js$/,
                exclude: /(node_modules|bower_components)/,
                use: {
                    loader: 'babel-loader',
                    options: {
                            presets: ['env']
                        }
                    }
            },
            {
                test: /\.ts$/,
                use: {
                        loader: 'ts-loader'
                    }
            
            }]
    },
    plugins:[
        new webpack.ProvidePlugin({
            THREE: 'three'
        })
    ],
    devServer: {
        host: '0.0.0.0',
        port:8888,
        disableHostCheck: true,
        contentBase: [path.join(__dirname, "public"),path.join("/")]
   }
};

and tsconfig.json

{
  "compilerOptions": {
    "target": "es5" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */,
    "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
    "declaration": false /* Generates corresponding '.d.ts' file. */,
    "declarationMap": false /* Generates a sourcemap for each corresponding '.d.ts' file. */,
    "sourceMap": true /* Generates corresponding '.map' file. */,
    "outDir": "./" /* Redirect output structure to the directory. */,
    "strict": false /* Enable all strict type-checking options. */,
    "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
    // "lib": "es6"
  },
}

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant