Question
Daoyuan Sun · Feb 23, 2021

Can't compile in VSCode

When I use vscode, Some classes cannot be compiled, while others can .it will report the following error:

What should I do?

Product version: Ensemble 2018.1
$ZV: 2018.1.0HS.1010.0
00
3 0 13 133
Log in or sign up to continue

Replies

Hi Daoyuan,

Can this class be compiled in Studio? 

Best regards,

Jeff

Hi Jeff,

thank you for your reply,

the class can be compiled normally in Studio.

It is weird to have permission issue if you use same user in VSCode as you do in Studio. It would be more convenient if we can have check your actual environment. You may contact me @jeff.liu@intersystems.com if you want me to have a look.

finally I solved the problem  by setting resource %DB_%DEFAULT RW permissions.

Hi Daoyuan,

Good to see that you solved it. Do you still need me to investigate any other issue? 

I replied your email, but havn't heard back yet.

Best regards,

Jeff

Sorry Jeff, I thought I had sent the email, but I just realized that I pressed the wrong button.

Thank you for offering in my two posts,I think I can do the rest by myself.

Best wishs,

Daoyuan

It's very valuable,I'll read intensively

Should not be any problem if you use the same user both in Studio and VSCode. PROTECT error means you have security issue and your user not granted for write permission, or that database is just in read only mode

Yeah! I was inspired by your comments,finally I gave the %DB_%DEFAULT RW permissions.

Are some classes in a package that is mapped to a different database that you don't have WRITE permission on?

I can't even compile a class that doesn't extends any classes but only writes HelloWorld