Cannot build ionic project

Hello i am trying to build my ionic project but it is not working. I already did install npm, ionic, node_modules,platforms and plugins again.

The stacktrace is:
12:03:44] ionic-app-scripts 1.1.4
[12:03:44] build dev started …
[12:03:44] clean started …
[12:03:44] clean finished in 3 ms
[12:03:44] copy started …
[12:03:44] transpile started …
[12:03:48] typescript: node_modules/@ionic/app-scripts/dist/util/clean-css-factory.d.ts, line: 2
Module ‘’*’’ has no exported member ‘Options’.

   L1:  import * as cleanCss from 'clean-css';
   L2:  export declare function getCleanCssInstance(options: cleanCss.Options): cleanCss;
   L3:  export interface CleanCssConfig {

[12:03:48] typescript: node_modules/@ionic/app-scripts/dist/util/clean-css-factory.d.ts, line: 2
Cannot find name ‘cleanCss’.

   L1:  import * as cleanCss from 'clean-css';
   L2:  export declare function getCleanCssInstance(options: cleanCss.Options): cleanCss;
   L3:  export interface CleanCssConfig {

[12:03:48] typescript: node_modules/@ionic/app-scripts/dist/util/clean-css-factory.d.ts, line: 6
Module ‘’*’’ has no exported member ‘Options’.

   L5:      destFileName: string;

[12:03:48] typescript: node_modules/@ionic/app-scripts/dist/util/virtual-file-utils.d.ts, line: 1
L6: options?: cleanCss.Options;

        Cannot find type definition file for 'node'. 

   L1:  import { Stats } from 'fs';   

[12:03:48] typescript: node_modules/@ionic/app-scripts/dist/util/virtual-file-utils.d.ts, line: 3
L2: export declare class VirtualStats implements Stats {

        Cannot find name 'Stats'. 

   L2:  export declare class VirtualStats implements Stats {
   L3:      protected _path: string;     
   L4:      protected _ctime: Date;

[12:03:48] transpile failed
[12:03:48] ionic-app-script task: “build”
[12:03:48] Error: Error

npm ERR! Darwin 15.5.0
npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” “run” “ionic:build” "–"
npm ERR! node v6.10.0
npm ERR! npm v4.3.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ionic-hello-world@ ionic:build: ionic-app-scripts build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ionic-hello-world@ ionic:build script ‘ionic-app-scripts build’.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ionic-hello-world package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ionic-app-scripts build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ionic-hello-world
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR! npm owner ls ionic-hello-world

Thank u for help.

Exactly the same issue here,

In my case it was a wrong import. I did import getConfig Class and this caused the error. I don’t see any connection but that solved the issue.

2 Likes

If it’s really exactly the same issue, upgrade your node to 6.x.

Thanks I also found it was also a wrong import on a page on my side :slight_smile:

That exactly was my problem. Thanks :+1: