2

I am using webpack with 4.8.1 version to bundle typescript which has 2.8.1 version but when i am using that bundled js on browser i am getting error Void 0 is not function.here is my webpack.config.js file

var glob = require("glob")module.exports={
entry:{
  LiveAgentApplication:"./Scripts/LiveAgent.Application.ts"
},output: {
    path:__dirname+'/dist',
    filename: '[name].bundle.js'
  },module: {
    rules: [
      { test: /\.ts$/, loader: 'ts-loader' }
    ]
  },optimization: {
    minimize: false
  }}

Here is my tsconfig.js

{
"compilerOptions": {
    "target": "es5",
    "module": "system",
    "noImplicitAny": false,
    "removeComments": true,
    "preserveConstEnums": true,
    "outFile": "../../built/local/tsc.js",
    "sourceMap": true,
    "allowJs": true,
    "moduleResolution": "node"
},
"include": [
    "./Scripts/*"
],
"exclude": [
    "node_modules",
    "**/*.spec.ts"
]}

And package.json is as follows:

{"name": "Resources",
 "version": "1.0.0",
 "description": "",
 "main": "index.js",
 "scripts": {
   "test": "echo \"Error: no test specified\" && exit 1",
   "refreshVSToken ": "vsts-npm-auth -config .npmrc"
  },
 "keywords": [],
 "author": "",
 "license": "ISC",
 "dependencies": {
 "geofluent-bundle": "^1.0.3",
 "geofluent-chat-translation-bundle": "^1.0.2",
 "geofluent-common-bundle": "^1.0.3",
 "geofluent-itranslator-bundle": "^1.0.6",
 "geofluent-sdk-bundle": "^1.0.1",
 "geofluent-tokenizer-bundle": "^1.0.4",
 "install": "^0.11.0",
 "jquery": "^3.3.1",
 "npm": "^5.8.0",
 "ts-loader": "^4.2.0",
 "webpack": "^4.8.1",
 "webpack-cli": "^2.1.3",
 "webpack-system-register": "^1.6.0",
 },"devDependencies": {
 "@types/jquery": "^3.3.1"
}}

Note:some of the node modules i am using are hosted on our organization's private NPM registry

  • 1
    It's impossible to say what's wrong because an error occurs at runtime and isn't informative. Currently you're the only person who can debug it. Check the function where the error occurs in call stack. The question requires a way for other users to replicate the problem see, https://stackoverflow.com/help/mcve . This may not need private modules if the issue can be replicated without them. – Estus Flask May 15 '18 at 14:15

0 Answers0