bleenco / ngx-uploader

Angular File Uploader
https://ngx-uploader.jankuri.me
MIT License
757 stars 349 forks source link

Unable to build using --prod - Module build failed: Error: ENOENT: no such file or directory - ng-file-drop.directive.js #352

Open bastibense opened 7 years ago

bastibense commented 7 years ago

I'm unable to build my project using Ionic and Cordova when using the --prod flag. Any suggestions?

Using ngx-uploader@latest (4.0.0)

$ ionic cordova run ios --device --prod 
[INFO] Running app-scripts build: --prod --platform ios --target cordova
[07:38:33]  build prod started ... 
[07:38:33]  clean started ... 
[07:38:33]  clean finished in 1 ms 
[07:38:33]  copy started ... 
[07:38:33]  deeplinks started ... 
[07:38:33]  deeplinks finished in 155 ms 
[07:38:33]  ngc started ... 
[07:38:42]  ngc finished in 8.94 s 
[07:38:42]  preprocess started ... 
[07:38:42]  preprocess finished in 105 ms 
[07:38:42]  webpack started ... 
[07:38:44]  copy finished in 10.77 s 
Error: ./node_modules/ngx-uploader/src/ngx-uploader/directives/ng-file-drop.directive.ts
Module build failed: Error: ENOENT: no such file or directory, open '/Users/bbense/devel/p4-app/node_modules/ngx-uploader/src/ngx-uploader/directives/ng-file-drop.directive.js'
 @ ./src/components/upload-publication/upload-publication.ngfactory.ts 30:0-87
 @ ./src/app/app.module.ngfactory.ts
 @ ./src/app/main.ts,./node_modules/ngx-uploader/src/ngx-uploader/directives/ng-file-select.directive.ts
Module build failed: Error: ENOENT: no such file or directory, open '/Users/bbense/devel/p4-app/node_modules/ngx-uploader/src/ngx-uploader/directives/ng-file-select.directive.js'
 @ ./src/components/upload-publication/upload-publication.ngfactory.ts 31:0-89
 @ ./src/app/app.module.ngfactory.ts
 @ ./src/app/main.ts,./node_modules/ngx-uploader/src/ngx-uploader/module/ngx-uploader.module.ts
Module build failed: Error: ENOENT: no such file or directory, open '/Users/bbense/devel/p4-app/node_modules/ngx-uploader/src/ngx-uploader/module/ngx-uploader.module.js'
 @ ./src/app/app.module.ngfactory.ts 93:0-80
 @ ./src/app/main.ts
    at new BuildError (/Users/bbense/devel/p4-app/node_modules/@ionic/app-scripts/dist/util/errors.js:16:28)
    at callback (/Users/bbense/devel/p4-app/node_modules/@ionic/app-scripts/dist/webpack.js:123:28)
    at emitRecords.err (/Users/bbense/devel/p4-app/node_modules/webpack/lib/Compiler.js:269:13)
    at Compiler.emitRecords (/Users/bbense/devel/p4-app/node_modules/webpack/lib/Compiler.js:375:38)
    at emitAssets.err (/Users/bbense/devel/p4-app/node_modules/webpack/lib/Compiler.js:262:10)
    at applyPluginsAsyncSeries1.err (/Users/bbense/devel/p4-app/node_modules/webpack/lib/Compiler.js:368:12)
    at next (/Users/bbense/devel/p4-app/node_modules/tapable/lib/Tapable.js:218:11)
    at Compiler.compiler.plugin (/Users/bbense/devel/p4-app/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:99:4)
    at Compiler.applyPluginsAsyncSeries1 (/Users/bbense/devel/p4-app/node_modules/tapable/lib/Tapable.js:222:13)
    at Compiler.afterEmit (/Users/bbense/devel/p4-app/node_modules/webpack/lib/Compiler.js:365:9)

Ionic Info

cli packages: (/Users/bbense/.nvm/versions/node/v7.10.0/lib/node_modules)

    @ionic/cli-utils  : 1.12.0
    ionic (Ionic CLI) : 3.12.0

global packages:

    cordova (Cordova CLI) : 7.0.1 

local packages:

    @ionic/app-scripts : 3.0.0
    Cordova Platforms  : android 6.2.3 browser 4.1.0 ios 4.5.1 iosX 4.4.0
    Ionic Framework    : ionic-angular 3.7.1

System:

    ios-deploy : 1.9.2 
    ios-sim    : 5.0.13 
    Node       : v7.10.0
    npm        : 4.2.0 
    OS         : macOS High Sierra
    Xcode      : Xcode 9.0 Build version 9A235 

Misc:

    backend : legacy
bastibense commented 7 years ago

For simplicity of reproduction, ionic build --prod throws the same error.

bastibense commented 7 years ago

I created a minimal project that shows the problem.

  1. unzip attached file
  2. run yarn to install dependencies
  3. run ionic build --prod

bugtest.zip

Hope that helps.

jkuri commented 7 years ago

thanks Bastien. will check this when get to the computer.

On 10 October 2017 at 09:50:49, Bastian Bense (notifications@github.com) wrote:

I created a minimal project that shows the problem.

  1. unzip attached file
  2. run yarn to install dependencies
  3. run `ionic build --prod``

bugtest.zip https://github.com/jkuri/ngx-uploader/files/1370989/bugtest.zip

Hope that helps.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jkuri/ngx-uploader/issues/352#issuecomment-335390432, or mute the thread https://github.com/notifications/unsubscribe-auth/ABtntp4b6Drt3h41VO8dilrFzk0zVmjZks5sqyHZgaJpZM4PzZvA .

retailify commented 7 years ago

@jkuri did you checked it?

jkuri commented 7 years ago

no. but I believe it should work with the new version.