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

Production build fails with an error #1025

Open
ryaa opened this issue Jun 5, 2017 · 1 comment
Open

Production build fails with an error #1025

ryaa opened this issue Jun 5, 2017 · 1 comment

Comments

@ryaa
Copy link

ryaa commented Jun 5, 2017

Short description of the problem:

When ionic_generate_source_map and ionic_source_map_type are removed from package.json (as described here the production build fails with the below error

[16:52:52]  uglifyjs failed: ENOENT: no such file or directory, open
            '/Users/alexryltsov/Git/boss811.mobile/www/build/main.js.map'

What behavior are you expecting?

Production build should be executed successfully and create the build without source maps

Steps to reproduce:

  1. remove ionic_generate_source_map and ionic_source_map_type from package.json
  2. issue ionic build android --release --prod
    Note that the build fails with
Alexs-MacBook-Pro-3:boss811.mobile alexryltsov$ ionic build android --release --prod

> [email protected] ionic:build /Users/alexryltsov/Git/boss811.mobile
> ionic-app-scripts build "--release" "--prod"

[16:51:20]  ionic-app-scripts 1.1.4
[16:51:20]  build prod started ...
[16:51:20]  clean started ...
[16:51:20]  clean finished in 4 ms
[16:51:20]  copy started ...
[16:51:20]  ngc started ...
[16:51:37]  ngc finished in 17.48 s
[16:51:37]  preprocess started ...
[16:51:37]  optimization started ...
[16:51:39]  copy finished in 19.45 s
[16:51:49]  optimization finished in 12.09 s
[16:51:49]  preprocess finished in 12.09 s
[16:51:49]  webpack started ...
keywords if/then/else require v5 option
[16:52:00]  webpack finished in 10.93 s
[16:52:00]  sass started ...
[16:52:00]  transpile bundle started ...
[16:52:30]  transpile bundle finished in 29.35 s
[16:52:30]  uglifyjs started ...
[16:52:31]  sass finished in 30.80 s
[16:52:31]  cleancss started ...
[16:52:35]  cleancss finished in 3.96 s
[16:52:52]  uglifyjs failed: ENOENT: no such file or directory, open
            '/Users/alexryltsov/Git/boss811.mobile/www/build/main.js.map'
[16:52:52]  ionic-app-script task: "build"
[16:52:52]  Error: ENOENT: no such file or directory, open '/Users/alexryltsov/Git/boss811.mobile/www/build/main.js.map'
Error: ENOENT: no such file or directory, open '/Users/alexryltsov/Git/boss811.mobile/www/build/main.js.map'
    at Error (native)
    at Object.fs.openSync (fs.js:640:18)
    at Object.fs.readFileSync (fs.js:508:33)
    at Object.exports.minify (/Users/alexryltsov/Git/boss811.mobile/node_modules/uglify-js/tools/node.js:120:31)
    at runUglifyInternal (/Users/alexryltsov/Git/boss811.mobile/node_modules/@ionic/app-scripts/dist/uglifyjs.js:47:19)
    at /Users/alexryltsov/Git/boss811.mobile/node_modules/@ionic/app-scripts/dist/uglifyjs.js:31:32
    at uglifyjsWorker (/Users/alexryltsov/Git/boss811.mobile/node_modules/@ionic/app-scripts/dist/uglifyjs.js:22:12)
    at process.<anonymous> (/Users/alexryltsov/Git/boss811.mobile/node_modules/@ionic/app-scripts/dist/worker-process.js:8:9)
    at emitTwo (events.js:106:13)
    at process.emit (events.js:191:7)

insert any relevant code between the above and below backticks

Which @ionic/app-scripts version are you using?
Your system information:

Cordova CLI: 7.0.0
Ionic Framework Version: 2.2.0
Ionic CLI Version: 2.2.3
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 1.1.4
ios-deploy version: 1.9.0
ios-sim version: 5.0.13
OS: macOS Sierra
Node Version: v6.9.2
Xcode version: Xcode 8.3.2 Build version 8E2002

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

@hmsoftware
Copy link

i have have this issue on mac with ionic-app-scripts 3

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

2 participants