Titanium JIRA Archive
Alloy (ALOY)

[ALOY-1736] aloy new fails if dev dependencies do not exist in package.Json

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2020-08-13T14:39:55.000+0000
Affected Version/sn/a
Fix Version/sCLI Release 8.1.0
ComponentsRuntime
Labelsn/a
ReporterSamir Mohammed
AssigneeEwan Harris
Created2020-08-07T14:26:00.000+0000
Updated2020-08-13T14:39:55.000+0000

Description

If dev dependencies are missing or do not exist in the package.json the following error is seen:
[INFO]  Project created successfully in 19s 632ms
[ERROR] An unknown error occurred
[ERROR] Cannot read property '@titanium-sdk/webpack-plugin-classic' of undefined

 

2020-08-07T12:53:40.708Z | ERROR  | Command failed: "C:\Program Files\nodejs\node.exe" "C:\Users\APPC\.appcelerator\install\8.1.0-master.9\package\node_modules\alloy\bin\alloy" new --force . webpack-default
[ERROR] An unknown error occurred
[ERROR] Cannot read property '@titanium-sdk/webpack-plugin-classic' of undefined

Comments

  1. Ewan Harris 2020-08-07

    Test steps: 1. Create a titanium app ti create --name testdevdep --id com.samir.rules --type app 2. cd into that dir 3. Create a package.json with just the an empty object {} 4. Run alloy new . webpack-default
  2. Ewan Harris 2020-08-07

    PR: https://github.com/appcelerator/alloy/pull/965
  3. Samir Mohammed 2020-08-13

    *Closing ticket*, using CLI version 8.1.0-master.11 and following the instructions below in the appc CLI, no error is shown.

    appc new --name testdevdep --id com.samir.rules --type titanium --classic

    cd in to the dir

    create package.json

    add an empty array

    appc alloy new . webpack-default

JSON Source