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

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

Open
kper opened this issue Feb 16, 2018 · 4 comments
Open

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

kper opened this issue Feb 16, 2018 · 4 comments

Comments

@kper
Copy link

kper commented Feb 16, 2018

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
@matthiasunt
Copy link

I am gettin the same error. Have you solved this issue?

@kper
Copy link
Author

kper commented Apr 23, 2018

Unfortunately not

@ninjageekboi
Copy link

please post here if you solved the problem, thanks!

@mobigaurav
Copy link

Use below command, that should solve the issue.

npm install --save-dev @ionic/app-scripts@3.1.8 --exact

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

4 participants