ColdBox / coldbox-cli

The official ColdBox CLI for CommandBox
https://www.coldbox.org
3 stars 4 forks source link

colbox create resource: key [TEMPLATEPATH] doesn't exist #10

Open gavinbaumanis opened 1 week ago

gavinbaumanis commented 1 week ago

What are the steps to reproduce this issue?

  1. install coldbox-cli
  2. run coldbox create resource fredd --persistent

What happens?

 INFO   Generating (fredd) resources...

The file 'fredd.cfc' already exists, overwrite it (y/n)? : y
 INFO   --> Generated (fredd) Handler: [C:\Users\gavin\Workspace\1.Santi\handlers\/fredd.cfc]

The file 'new.cfm' already exists, overwrite it (y/n)? : y
 INFO   Created View [C:\Users\gavin\Workspace\1.Santi\views\fredd\/new.cfm]

The file 'edit.cfm' already exists, overwrite it (y/n)? : y
 INFO   Created View [C:\Users\gavin\Workspace\1.Santi\views\fredd\/edit.cfm]

The file 'show.cfm' already exists, overwrite it (y/n)? : y
 INFO   Created View [C:\Users\gavin\Workspace\1.Santi\views\fredd\/show.cfm]

The file 'index.cfm' already exists, overwrite it (y/n)? : y
 INFO   Created View [C:\Users\gavin\Workspace\1.Santi\views\fredd\/index.cfm]

 INFO   --> Generating integration tests...

The file 'freddTest.cfc' already exists, overwrite it (y/n)? : y
 INFO   Created Test [C:\Users\gavin\Workspace\1.Santi\tests\specs\integration\/freddTest.cfc]

 INFO   --> Generating ORM resource model (fredd)

The file 'Fredd.cfc' already exists, overwrite it (y/n)? : y
 INFO   Created Model: [C:\Users\gavin\Workspace\1.Santi\models\/Fredd.cfc]

The file 'FreddTest.cfc' already exists, overwrite it (y/n)? : y
 INFO   Created Test: [C:\Users\gavin\Workspace\1.Santi\tests\specs\unit\/FreddTest.cfc]

 INFO   --> Generating ORM Virtual Service (fredd)

ERROR (6.0.1+00796)

key [TEMPLATEPATH] doesn't exist

C:\Users\gavin\.CommandBox\cfml\modules\coldbox-cli\commands\coldbox\create\orm-virtual-service.cfc: line 46
44:
45:             // Read in Template
46:             var modelContent     = fileRead( "#variables.settings.templatePath#/orm/VirtualEntityService.txt" );
47:             var modelTestContent = fileRead( "#variables.settings.templatePath#/testing/ModelBDDContent.txt" );
48:
called from C:\Users\gavin\.CommandBox\cfml\system\services\CommandService.cfc: line 443
called from C:\Users\gavin\.CommandBox\cfml\system\services\CommandService.cfc: line 245
called from C:\Users\gavin\.CommandBox\cfml\system\Shell.cfc: line 862
called from C:\Users\gavin\.CommandBox\cfml\system\util\CommandDSL.cfc: line 267
called from C:\Users\gavin\.CommandBox\cfml\modules\coldbox-cli\commands\coldbox\create\resource.cfc: line 256
called from C:\Users\gavin\.CommandBox\cfml\system\services\CommandService.cfc: line 443
called from C:\Users\gavin\.CommandBox\cfml\system\services\CommandService.cfc: line 225
called from C:\Users\gavin\.CommandBox\cfml\system\Shell.cfc: line 865
called from C:\Users\gavin\.CommandBox\cfml\system\Shell.cfc: line 680
called from C:\Users\gavin\.CommandBox\cfml\system\Bootstrap.cfm: line 165

lucee.runtime.exp.ExpressionException: key [TEMPLATEPATH] doesn't exist
        at lucee.runtime.type.util.StructSupport.invalidKey(StructSupport.java:67)
        at lucee.runtime.type.StructImpl.get(StructImpl.java:149)
        at lucee.runtime.util.VariableUtilImpl.get(VariableUtilImpl.java:278)
        at lucee.runtime.PageContextImpl.get(PageContextImpl.java:1567)
        at modules.coldbox_cli360.commands.coldbox.create.orm_virtual_service_cfc720$cf.udfCall(/commandbox/modules/coldbox-cli/commands/coldbox/create/orm-virtual-service.cfc:46)
        at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:112)
        at lucee.runtime.type.UDFImpl._call(UDFImpl.java:358)
        at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:213)
        at lucee.runtime.ComponentImpl._call(ComponentImpl.java:699)
        at lucee.runtime.ComponentImpl._call(ComponentImpl.java:586)
        at lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1952)
        at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:866)
        at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1794)
        at system.services.commandservice_cfc$cf.udfCall1(/commandbox/system/services/CommandService.cfc:443)
        at system.services.commandservice_cfc$cf.udfCall(/commandbox/system/services/CommandService.cfc)
        at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:112)
        at lucee.runtime.type.UDFImpl._call(UDFImpl.java:358)
        at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:213)
        at lucee.runtime.type.scope.UndefinedImpl.callWithNamedValues(UndefinedImpl.java:804)
        at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:866)
        at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1794)
        at system.services.commandservice_cfc$cf.udfCall1(/commandbox/system/services/CommandService.cfc:245)
        at system.services.commandservice_cfc$cf.udfCall(/commandbox/system/services/CommandService.cfc)
        at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:112)
        at lucee.runtime.type.UDFImpl._call(UDFImpl.java:358)
        at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:213)
        at lucee.runtime.ComponentImpl._call(ComponentImpl.java:699)
        at lucee.runtime.ComponentImpl._call(ComponentImpl.java:586)
        at lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1952)
        at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:866)
        at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1794)
        at system.shell_cfc$cf.udfCall4(/commandbox/system/Shell.cfc:862)
        at system.shell_cfc$cf.udfCall(/commandbox/system/Shell.cfc)
        at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:112)
        at lucee.runtime.type.UDFImpl._call(UDFImpl.java:358)
        at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:213)
        at lucee.runtime.ComponentImpl._call(ComponentImpl.java:699)
        at lucee.runtime.ComponentImpl._call(ComponentImpl.java:586)
        at lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1952)
        at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:866)
        at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1794)
        at system.util.commanddsl_cfc$cf.udfCall2(/commandbox/system/util/CommandDSL.cfc:267)
        at system.util.commanddsl_cfc$cf.udfCall(/commandbox/system/util/CommandDSL.cfc)
        at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:112)
        at lucee.runtime.type.UDFImpl._call(UDFImpl.java:358)
        at lucee.runtime.type.UDFImpl.call(UDFImpl.java:223)
        at lucee.runtime.ComponentImpl._call(ComponentImpl.java:698)
        at lucee.runtime.ComponentImpl._call(ComponentImpl.java:586)
        at lucee.runtime.ComponentImpl.call(ComponentImpl.java:1933)
        at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:787)
        at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1775)
        at modules.coldbox_cli360.commands.coldbox.create.resource_cfc$cf.udfCall(/commandbox/modules/coldbox-cli/commands/coldbox/create/resource.cfc:256)
        at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:112)
        at lucee.runtime.type.UDFImpl._call(UDFImpl.java:358)
        at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:213)
        at lucee.runtime.ComponentImpl._call(ComponentImpl.java:699)
        at lucee.runtime.ComponentImpl._call(ComponentImpl.java:586)
        at lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1952)
        at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:866)
        at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1794)
        at system.services.commandservice_cfc$cf.udfCall1(/commandbox/system/services/CommandService.cfc:443)
        at system.services.commandservice_cfc$cf.udfCall(/commandbox/system/services/CommandService.cfc)
        at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:112)
        at lucee.runtime.type.UDFImpl._call(UDFImpl.java:358)
        at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:213)
        at lucee.runtime.type.scope.UndefinedImpl.callWithNamedValues(UndefinedImpl.java:804)
        at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:866)
        at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1794)
        at system.services.commandservice_cfc$cf.udfCall1(/commandbox/system/services/CommandService.cfc:225)
        at system.services.commandservice_cfc$cf.udfCall(/commandbox/system/services/CommandService.cfc)
        at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:112)
        at lucee.runtime.type.UDFImpl._call(UDFImpl.java:358)
        at lucee.runtime.type.UDFImpl.call(UDFImpl.java:223)
        at lucee.runtime.ComponentImpl._call(ComponentImpl.java:698)
        at lucee.runtime.ComponentImpl._call(ComponentImpl.java:586)
        at lucee.runtime.ComponentImpl.call(ComponentImpl.java:1933)
        at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:787)
        at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1775)
        at system.shell_cfc$cf.udfCall4(/commandbox/system/Shell.cfc:865)
        at system.shell_cfc$cf.udfCall(/commandbox/system/Shell.cfc)
        at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:112)
        at lucee.runtime.type.UDFImpl._call(UDFImpl.java:358)
        at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:213)
        at lucee.runtime.type.scope.UndefinedImpl.callWithNamedValues(UndefinedImpl.java:804)
        at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:866)
        at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1794)
        at system.shell_cfc$cf.udfCall3(/commandbox/system/Shell.cfc:680)
        at system.shell_cfc$cf.udfCall(/commandbox/system/Shell.cfc)
        at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:112)
        at lucee.runtime.type.UDFImpl._call(UDFImpl.java:358)
        at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:213)
        at lucee.runtime.ComponentImpl._call(ComponentImpl.java:699)
        at lucee.runtime.ComponentImpl._call(ComponentImpl.java:586)
        at lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1952)
        at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:866)
        at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1794)
        at users.gavin._commandbox46.cfml.system.bootstrap_cfm$cf.call(/Users/gavin/.CommandBox/cfml/system/Bootstrap.cfm:165)
        at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:1056)
        at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:948)
        at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:929)
        at j3lh5ynvlgtz.call(Unknown Source)
        at lucee.runtime.compiler.Renderer.tag(Renderer.java:107)
        at lucee.runtime.compiler.Renderer.script(Renderer.java:97)
        at lucee.runtime.jsr223.ScriptEngineImpl.eval(ScriptEngineImpl.java:65)
        at lucee.runtime.jsr223.ScriptEngineImpl.eval(ScriptEngineImpl.java:220)
        at cliloader.LoaderCLIMain.execute(LoaderCLIMain.java:339)
        at cliloader.LoaderCLIMain.execute(LoaderCLIMain.java:158)
        at cliloader.LoaderCLIMain.main(LoaderCLIMain.java:595)

What versions are you using?

Operating System: Windows 11 workstation CommandBox: 6.0.1+00796 ColdBox: 7.0.0 Lucee: 5.4.x and 6.1.x

gavinbaumanis commented 1 day ago

I suspect this is likely the same that sees coldbox create orm-crud entity... fail on Windows too.

https://github.com/ColdBox/coldbox-cli/issues/12