Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26798] Angular: Project template is outdated

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionDuplicate
Resolution Date2020-07-29T13:09:10.000+0000
Affected Version/sRelease 7.5.0
Fix Version/sRelease 9.1.0
ComponentsTooling
Labelsn/a
ReporterAminul Islam
AssigneeJan Vennemann
Created2019-02-05T15:05:57.000+0000
Updated2020-07-29T13:09:10.000+0000

Description

Hello! The *appc new -t app --ng* template is outdated. webpack.optimize.CommonsChunkPlugin has been removed, please use config.optimization.splitChunks instead. Steps : 1. Create a new Angular project: *appc new -t app --ng* 2. Build and run Angular project : *appc run -p android* *Error Log*:
Command
  /Users/Raju/.nvm/versions/node/v10.14.1/bin/node /Users/Raju/.appcelerator/install/7.0.9/package/node_modules/titanium/lib/titanium.js build -p android -T device -C 5200bd89b43b3503 --config-file /var/folders/47/ql8m2gld20g474cjx82w5fdr0000gp/T/build-1549374277920.json --log-level info --no-banner --project-dir /Users/Raju/Desktop/ag/agtwo

[INFO]  Found Titanium module id=ti.cloud version=3.2.9 platform=commonjs deploy-type=test path=/Users/Raju/Library/Application Support/Titanium/modules/commonjs/ti.cloud/3.2.9
[INFO]  Found better matching module id=ti.cloud version=latest platform=commonjs deploy-type=test path=/Users/Raju/Library/Application Support/Titanium/modules/commonjs/ti.cloud/3.2.11
[INFO]  Found Titanium module id=com.appcelerator.apm version=3.1.2 platform=android deploy-type=test path=/Users/Raju/Library/Application Support/Titanium/modules/android/com.appcelerator.apm/3.1.2
[INFO]  Deploy type: test
[INFO]  Building for target: device
[INFO]  Building for device: 5200bd89b43b3503
[INFO]  Targeting Android SDK API: 28
[INFO]  Building for the following architectures: arm64-v8a, armeabi-v7a, x86
[INFO]  Signing with keystore: /Users/Raju/Library/Application Support/Titanium/mobilesdk/osx/7.5.0.GA/android/dev_keystore (tidev)
[INFO]  Debugging disabled
[INFO]  Profiler disabled
[INFO]  Forcing rebuild: /Users/Raju/Desktop/ag/agtwo/build/android/build-manifest.json does not exist
[INFO]  Running initial Webpack build
/Users/Raju/Desktop/ag/agtwo/app/node_modules/webpack-cli/bin/cli.js:231
				throw err;
				^

Error: webpack.optimize.CommonsChunkPlugin has been removed, please use config.optimization.splitChunks instead.
    at Object.get [as CommonsChunkPlugin] (/Users/Raju/Desktop/ag/agtwo/app/node_modules/webpack/lib/webpack.js:185:10)
    at module.exports.env (/Users/Raju/Desktop/ag/agtwo/app/webpack.config.js:67:25)
    at handleFunction (/Users/Raju/Desktop/ag/agtwo/app/node_modules/webpack-cli/bin/prepareOptions.js:21:13)
    at prepareOptions (/Users/Raju/Desktop/ag/agtwo/app/node_modules/webpack-cli/bin/prepareOptions.js:9:5)
    at requireConfig (/Users/Raju/Desktop/ag/agtwo/app/node_modules/webpack-cli/bin/convert-argv.js:118:14)
    at /Users/Raju/Desktop/ag/agtwo/app/node_modules/webpack-cli/bin/convert-argv.js:124:17
    at Array.forEach (<anonymous>)
    at module.exports (/Users/Raju/Desktop/ag/agtwo/app/node_modules/webpack-cli/bin/convert-argv.js:122:15)
    at yargs.parse (/Users/Raju/Desktop/ag/agtwo/app/node_modules/webpack-cli/bin/cli.js:228:39)
    at Object.parse (/Users/Raju/Desktop/ag/agtwo/app/node_modules/yargs/yargs.js:567:18)
    at /Users/Raju/Desktop/ag/agtwo/app/node_modules/webpack-cli/bin/cli.js:206:8
    at Object.<anonymous> (/Users/Raju/Desktop/ag/agtwo/app/node_modules/webpack-cli/bin/cli.js:500:3)
    at Module._compile (internal/modules/cjs/loader.js:688:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
    at Function.Module._load (internal/modules/cjs/loader.js:529:3)
    at Module.require (internal/modules/cjs/loader.js:636:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/Users/Raju/Desktop/ag/agtwo/app/node_modules/webpack/bin/webpack.js:155:2)
    at Module._compile (internal/modules/cjs/loader.js:688:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
    at Function.Module._load (internal/modules/cjs/loader.js:529:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:741:12)
    at startup (internal/bootstrap/node.js:285:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:739:3)
[ERROR] An error occurred during build after 3s 661ms
[ERROR] Webpack exited with non-zero exit code 1

Comments

  1. Jan Vennemann 2019-03-19

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/10783 PR (8_0_X): https://github.com/appcelerator/titanium_mobile/pull/10784
  2. Jan Vennemann 2019-04-01

    Putting back in progress to add compatibility with Angular 7.
  3. Jan Vennemann 2020-07-29

    Closing in favor of TIMOB-27856, where the template was completely rewritten for Angular 9 and the new Webpack build pipeline.

JSON Source