question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jkuricommented, Nov 13, 2017

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

0reactions
retailifycommented, Nov 13, 2017

@jkuri did you checked it?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Module build failed: Error: ENOENT: no such file or directory
I reinstalled angular-devkit with npm install --save-dev @angular-devkit/build-angular but still facing the same issue. What am I missing here?
Read more >
Runtime Error Module build failed: Error: ENOENT - Ionic Forum
Getting this error when I try ionic serve The error is about missing some js files...I am using type script and I can...
Read more >
How To Fix the “Enoent” Error? - Position Is Everything
JS ; – Getting Script-webpack-Plugin Error Message Along With Enoent Error; – Delete Some CSS Files ... What Does Enoent: No Such File...
Read more >
no such file or directory, open '/home/package.json'
“error enoent ENOENT: no such file or directory, open '/home/package.json'” Code Answer's. Grepper Logo Small. Search.
Read more >
Error! Can't build edge function /: ENOENT: no such file or ...
Just trying the examples from the 12.2 Middleware update and migration guide, and alternately from the Edge Middleware docs.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found