This repository was archived by the owner on May 1, 2020. It is now read-only.
This repository was archived by the owner on May 1, 2020. It is now read-only.
production build (--prod) fails (with blank starter template too) #1283
Open
Description
Short description of the problem:
Trying to create a production build for my project fails with an error.
What behavior are you expecting?
The production build should pass without errors (with a new blank template too).
Steps to reproduce:
So i created an empty project with:
ionic start prod blank
Going into the new project dir i started a new production build
ionic build --prod
The output is the following:
[INFO] Running app-scripts build: --prod
[11:57:49] build prod started ...
[11:57:49] clean started ...
[11:57:49] clean finished in 1 ms
[11:57:49] copy started ...
[11:57:49] deeplinks started ...
[11:57:49] deeplinks finished in 31 ms
[11:57:49] ngc started ...
[11:57:57] ngc finished in 8.31 s
[11:57:57] preprocess started ...
[11:57:57] copy finished in 8.41 s
[11:57:57] preprocess finished in 128 ms
[11:57:57] webpack started ...
[11:58:25] webpack finished in 27.75 s
[11:58:25] uglifyjs started ...
[11:58:25] sass started ...
[11:58:27] sass finished in 1.85 s
[11:58:27] cleancss started ...
[11:58:37] cleancss finished in 10.32 s
[11:58:42] uglifyjs finished in 16.88 s
[11:58:42] postprocess started ...
There is no "postprocess finished" message so i ran
npm run ionic:build --prod
Then i got the following message:
> [email protected] ionic:build /Users/big-r/Documents/Developer/prototype/prod
> ionic-app-scripts build
[12:00:02] ionic-app-scripts 3.0.0
[12:00:02] build prod started ...
[12:00:02] clean started ...
[12:00:02] clean finished in 2 ms
[12:00:02] copy started ...
[12:00:02] deeplinks started ...
[12:00:03] deeplinks finished in 33 ms
[12:00:03] ngc started ...
[12:00:09] ngc finished in 6.45 s
[12:00:09] preprocess started ...
[12:00:09] copy finished in 6.57 s
[12:00:09] preprocess finished in 104 ms
[12:00:09] webpack started ...
[12:00:33] webpack finished in 23.87 s
[12:00:33] uglifyjs started ...
[12:00:33] sass started ...
[12:00:35] sass finished in 1.66 s
[12:00:35] cleancss started ...
[12:00:45] cleancss finished in 10.24 s
[12:00:49] uglifyjs finished in 15.79 s
[12:00:49] postprocess started ...
events.js:160
throw er; // Unhandled 'error' event
^
Error: ENOENT: no such file or directory, open '/Users/big-r/Documents/Developer/prototype/prod/www/build/main.js.map'
at Error (native)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] ionic:build: `ionic-app-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] ionic: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! /Users/big-r/.npm/_logs/2017-10-16T10_00_49_372Z-debug.log
Here is the content of the log file:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node@6/6.11.4_1/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'run',
1 verbose cli 'ionic:build',
1 verbose cli '--prod' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'preionic:build', 'ionic:build', 'postionic:build' ]
5 info lifecycle [email protected]~preionic:build: [email protected]
6 info lifecycle [email protected]~ionic:build: [email protected]
7 verbose lifecycle [email protected]~ionic:build: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~ionic:build: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/big-r/Documents/Developer/prototype/prod/node_modules/.bin:/usr/local/opt/node@6/bin:/Applications/Postgres.app/Contents/Versions/latest/bin:/Applications/Postgres.app/Contents/Versions/latest/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin
9 verbose lifecycle [email protected]~ionic:build: CWD: /Users/big-r/Documents/Developer/prototype/prod
10 silly lifecycle [email protected]~ionic:build: Args: [ '-c', 'ionic-app-scripts build' ]
11 silly lifecycle [email protected]~ionic:build: Returned: code: 1 signal: null
12 info lifecycle [email protected]~ionic:build: Failed to exec ionic:build script
13 verbose stack Error: [email protected] ionic:build: `ionic-app-scripts build`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:280:16)
13 verbose stack at emitTwo (events.js:106:13)
13 verbose stack at EventEmitter.emit (events.js:191:7)
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at emitTwo (events.js:106:13)
13 verbose stack at ChildProcess.emit (events.js:191:7)
13 verbose stack at maybeClose (internal/child_process.js:920:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)
14 verbose pkgid [email protected]
15 verbose cwd /Users/big-r/Documents/Developer/prototype/prod
16 verbose Darwin 16.7.0
17 verbose argv "/usr/local/Cellar/node@6/6.11.4_1/bin/node" "/usr/local/bin/npm" "run" "ionic:build" "--prod"
18 verbose node v6.11.4
19 verbose npm v5.4.2
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] ionic:build: `ionic-app-scripts build`
22 error Exit status 1
23 error Failed at the [email protected] ionic:build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Which @ionic/app-scripts version are you using?
ionic info
cli packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.12.0
ionic (Ionic CLI) : 3.12.0
local packages:
@ionic/app-scripts : 3.0.0
Ionic Framework : ionic-angular 3.7.1
System:
Node : v6.11.4
npm : 5.4.2
OS : macOS Sierra
Misc:
backend : legacy
Maybe related issue:
#1199 (Postproccess tries to move .map files on --prod builds)
Metadata
Metadata
Assignees
Labels
No labels