Long-time listener, first-time poster. At least in...
# box-products
b
Long-time listener, first-time poster. At least in this channel. I was in CB and when I checked for an update, it said there was one. So I downloaded it and ran it and everything seemed to go fine. But now when I try to run almost any command I get the error,
C:\Program Files\Box\ is not a package!
I've tried uninstalling it by deleting the binary, JRE, and .CommandBox directory and reinstalling it, but I get the same results. Google was no help. Any ideas on how to fix this, kind folks?
b
@Brian Ok, so to start, when you say "CB", do you mean ColdBox, ContentBox, or CommandBox? šŸ™‚
😁 1
I'm going to assume CommandBox, but there's just a lot of missing info here
What exactly are you running? Where? how? What is the full error message?
A screenshot would go a long way in helping fill some of these missing pieces
Also, what exact version of CommandBox are you on?
b
Correct deduction, I meant CommandBox by CB. I'm running version 5.5.2. Hopefully this screenshot will answer the other questions.
Here's another one in case that helps.
b
@Brian The first error is exactly what it says it is. You're trying to run the
package list
command in a folder which has no
box.json
and is therefore not a package
That's not a CommandBox issue, that's a you issue šŸ˜‰
šŸ‘ 1
The second error looks like either • permissions • or a process that's locked the file The file in question being the
server.json
for that server
I'd check what user CommandBox is running as and then see if that user has access to write to that file.
If so, I'd check and see if another process is currently locking that file. (Java is always a little vague with its error messages when it comes to a file being locked or not having permissions)
An interesting clue is that your screenshot appears to show that you were asked to provide a new name for the server, which only happens when you try to start a server that's already running. Is there a reason you're doing this?
On a slightly-related note-- I'm guessing at least your first issue is related to you not realizing what the current working directory of the shell is when running your commands.
I would recommend installation the
commandbox-bullet-train
modules as it is very helpful in providing information about the current folder you are in.
b
I might just have to start over with my CommandBox education. lol
Maybe upgrading it was completely unrelated.
b
Well, upgrading is always a good idea.
But I'm not sure that it necessarily caused any of your issues
p
Brad is the expert but in situations like this, I list all the servers, server list, then stop any running ones, server stop [name], and then finally forget the server, server forget [name]. One other handy command is, artifacts clean. That will erase all the downloaded modules and make commandbox download them again. Typically this is all achieved when you delete the .commandbox directory, which you said you did. But I'm not sure what happens if you had running servers when you did that. You may have left some locked files and running Java processes.
ā˜šŸ¾ 1