[NPMCLI-35] Error when creating component with -a availability option, outside the light module Created: 19/Jul/16  Updated: 22/Aug/16  Resolved: 20/Jul/16

Status: Closed
Project: Magnolia CLI
Component/s: None
Affects Version/s: None
Fix Version/s: 0.0.1

Type: Bug Priority: Major
Reporter: Christopher Zimmermann Assignee: Federico Grilli
Resolution: Fixed Votes: 0
Labels: quickwin
Remaining Estimate: 0d
Time Spent: 0.5h
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Sprint: Basel 53
Story Points: 1

 Description   

The error is

/usr/local/lib/node_modules/@magnolia/cli/bin/addAvailability.js:122
Error: ENOENT: no such file or directory, open '../mod1/mod1/templates/pages/page1.ftl'
And the contents of the page1.yaml file are erased.

To reproduce:

mgnl create-light-module mod1
mgnl create-page page1 -p mod1

Any of the following commands then produce the same error

mgnl create-component comp2 -p mod1 -a pages/page1@main
mgnl create-component comp2 -p mod1 -a mod1:pages/page1@main

-
I looked at this with cmeier and he was able to accomplish the same basic task - but we didnt understand under what conditions it worked. The above commands failed on both our systems with version 0.0.1-snapshot-70


Generated at Mon Feb 12 04:45:54 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.