Skip to content

TypeError: Cannot read property 'resolve' of undefined #23

@kper

Description

@kper

On ionic build --dev, I get this error message:

There was an error in config file "/home/kper/Work/Toni/toni-webviews-ionic/config/webpack.config.js". Using defaults instead.
TypeError: Cannot read property 'resolve' of undefined
    at Object.<anonymous> (/home/kper/Work/Toni/toni-webviews-ionic/config/webpack.config.js:11:22)
...

In webpack.config.js Line 11:

useDefaultConfig.prod.resolve.alias = {
  "@app/env": path.resolve(environmentPath('prod'))
};

This is the output of useDefaultConfig:

{ entry: '/home/kper/Work/Toni/toni-webviews-ionic/src/app/main.ts',
  output: 
   { path: '{{BUILD}}',
     publicPath: 'build/',
     filename: 'main.js',
     devtoolModuleFilenameTemplate: [Function: provideCorrectSourcePath] },
  devtool: 'source-map',
  resolve: 
   { extensions: [ '.ts', '.js', '.json' ],
     modules: [ '/home/kper/Work/Toni/toni-webviews-ionic/node_modules' ] },
  module: { loaders: [ [Object], [Object], [Object] ] },
  plugins: [ IonicEnvironmentPlugin { context: [Object] } ],
  node: { fs: 'empty', net: 'empty', tls: 'empty' } }

ionic info

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.19.0
    ionic (Ionic CLI) : 3.19.0

global packages:

    cordova (Cordova CLI) : 7.1.0 

local packages:

    @ionic/app-scripts : 1.3.7
    Cordova Platforms  : none
    Ionic Framework    : ionic-angular 3.5.0

System:

    Node : v6.10.3
    npm  : 5.6.0 
    OS   : Linux 4.13

Environment Variables:

    ANDROID_HOME : not set

Misc:

    backend : pro

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions