Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

Project not building #1537

Open
albertodenatale opened this issue Sep 13, 2019 · 0 comments
Open

Project not building #1537

albertodenatale opened this issue Sep 13, 2019 · 0 comments

Comments

@albertodenatale
Copy link

Description:
After cloning the repository, installing the packages and running "npm run build" the project does not build.

What behavior are you expecting?

The project builds.

Steps to reproduce:

  1. npm install
  2. npm run build
It seems like the fs-extra library is exporting a function called "ensureDir" that is expecting a parameter of type "EnsureOptions".

However such parameter is not passed in from the caller function located in "helper.ts".

I could fix the build adding a fake parameter "<EnsureOptions> {}" but definitely would not work.

export function mkDirpAsync(directoryPath: string) {
  return new Promise((resolve, reject) => {
    ensureDir(directoryPath, <EnsureOptions> {}, (err: Error) => {
      if (err) {
        return reject(err);
      }
      return resolve();
    });
  });
}

Which @ionic/app-scripts version are you using?

3.2.4

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)

This is the error I get from console:

@ionic/[email protected] build C:\src\ionic-app-scripts
npm run clean && tsc && npm run sass

@ionic/[email protected] clean C:\src\ionic-app-scripts
rimraf ./dist

src/util/helpers.ts:214:30 - error TS2345: Argument of type '(err: Error) => void' is not assignable to parameter of type 'number | EnsureOptions'.
Type '(err: Error) => void' has no properties in common with type 'EnsureOptions'.

214 ensureDir(directoryPath, (err: Error) => {
~~~~~~~~~~~~~~~~~

Found 1 error.

npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @ionic/[email protected] build: npm run clean && tsc && npm run sass
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the @ionic/[email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\alberto.de.natale\AppData\Roaming\npm-cache_logs\2019-09-13T09_41_13_825Z-debug.log`

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

No branches or pull requests

1 participant