[Coldbox 6.6.1] New App - unable to start server

Just tried to create a new default app:

coldbox create app myapp
server start

The function [listAppend] does not exist in the Object, but there is a similar function with name [listValueCount] available.

\modules\commandbox-dotenv\interceptors\LoadEnvPreServers.cfc: line 12
10: function preServerStart(interceptData) {
11: var webRoot = variables.fileSystemUtil.normalizeSlashes( arguments.interceptData.serverDetails.serverInfo.webRoot );
12: var webRootEnvFile = webRoot.listAppend( variables.moduleSettings.fileName, “/”, false );
13: var envStruct = variables.envFileService.getEnvStruct( webRootEnvFile );
14: if ( !structIsEmpty( envStruct ) && variables.moduleSettings.printOnLoad ) {
called from \system\wirebox\system\core\events\EventPool.cfc: line 121
called from \system\wirebox\system\core\events\EventPool.cfc: line 99
called from \system\wirebox\system\core\events\EventPoolManager.cfc: line 59
called from \system\services\InterceptorService.cfc: line 55
called from \system\services\ServerService.cfc: line 253
called from \system\modules_app\server-commands\commands\server\start.cfc: line 155
called from \system\services\CommandService.cfc: line 342
called from \system\services\CommandService.cfc: line 138
called from \system\Shell.cfc: line 758
called from \system\Shell.cfc: line 578
called from \system\Bootstrap.cfm: line 145

Argh!..now I really am in trouble. I decided to update CommandBox to see if this was the problem - I was on version 4.7. When running box.exe I get:

Module [jmespath] failed to load!

Panic over.
Renaming the C:\Users[username].CommandBox allowed the new install to work (creating a new .CommandBox folder).

CommandBox updated and new app installed successfully.

Sorry if you’ve been reading this!

Interesting, John. Do you have any idea why your Commandbox server home was missing?

It’s possible an antivirus scanner could have quarantined the entire directory. I would check your antivirus program and ensure you have an exclusion in place for the Commandbox directory. That’s my two cents.

This is an interesting error because it could really only be caused if

  • your webroot variable wasn’t a string (like a boolean or integer)
  • You were on an old-enough version of CommandBox that it’s embedded Lucee version didn’t have list member functions yet on strings.

Well, that IS pretty old, lol. CommandBox 4.7 used Lucee, which is nearly 4 years old.

So that is actually just a secondary error. if you look at the stack trace in your screenshot, you’ll see the root cause is an error about a semi-colon in File.cfc which corresponds with a line of code running the CFZip tag. This means Lucee’s Compress extension failed to install so it literally didn’t recognize the CFML code while compiling. There’s no telling why this happened, but when you deleted your CommandBox home, it gave you a fresh Lucee install. Next time, you can try just deleting your .CommandBox/engine folder so you don’t lose all your settings, artifacts, JREs, and servers!