Code Monkey home page Code Monkey logo

Comments (12)

freddydk avatar freddydk commented on May 18, 2024 1

@BW-PA thanks for the explanation - will investigate that.

from al-go.

freddydk avatar freddydk commented on May 18, 2024 1

On the original error (@ingebruvik, @BW-PA and @gunnargestsson) in this issue, v1.2 of AL-Go will spawn a new PowerShell window elevated when trying to run from VS Code - instead of using the VS Code runner.

on @BusinessCentralGeek - the localDevEnv now includes a text:

NOTE: You need to have Docker installed, configured and be able to create Business Central containers for this to work.
If this fails, you can setup a cloud based development environment by running cloudDevEnv.ps1

and I am also working on supporting ACIs (Azure Container Instances) and Azure VMs for people having problems running docker on their machine. Unfortunately, we are seeing an increasingly number of problems with defender and Windows 10 (even some Windows 11).

from al-go.

freddydk avatar freddydk commented on May 18, 2024

Could you try to run:

Import-Module Microsoft.PowerShell.Archive

on your machine?
Which error is returned?

Thanks

from al-go.

freddydk avatar freddydk commented on May 18, 2024

In the end, there is something wrong with the machine - or some module installed, which prevents Expand-Archive to run.
You can also download and install 7zip (from https://www.7-zip.org/download.html), then the code will bypass Expand-Archive (and be faster).

from al-go.

ingebruvik avatar ingebruvik commented on May 18, 2024

I get no error when i run the Import-Module Microsoft.PowerShell.Archive command.
I will try to download and install 7zip and see what happens then.

from al-go.

BW-PA avatar BW-PA commented on May 18, 2024

I encountered the same error when running localDevEnv.ps1

Expand-7zipArchive : The 'Expand-Archive' command was found in the module 'Microsoft.PowerShell.Archive', but the module could not be 
loaded. For more information, run 'Import-Module Microsoft.PowerShell.Archive'.

When I run Import-Module Microsoft.PowerShell.Archive I get the following error

Import-LocalizedData : Cannot find the Windows PowerShell data file 'ArchiveResources.psd1' in directory 
'C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\Microsoft.PowerShell.Archive\en-GB\', or in any parent culture directories.
At C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\Microsoft.PowerShell.Archive\Microsoft.PowerShell.Archive.psm1:28 char:1
+ Import-LocalizedData  LocalizedData -filename ArchiveResources
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\WINDOWS\syst...eResources.psd1:String) [Import-LocalizedData], PSInvalidOperationExcep  
   tion
    + FullyQualifiedErrorId : ImportLocalizedData,Microsoft.PowerShell.Commands.ImportLocalizedData

I have 7zip installed

from al-go.

BW-PA avatar BW-PA commented on May 18, 2024

Interestingly, when I run localDevEnv.ps1 within a standalone powershell window I don't get the error and it uses 7zip
image

So it seems the error only occurs when running localDevEnv.ps1 from within VSCode integrated powershell terminal like is shown in the scenario steps screenshots

from al-go.

gunnargestsson avatar gunnargestsson commented on May 18, 2024

Same here, works in Powershell but not in the terminal section of VS Code.

from al-go.

BusinessCentralGeek avatar BusinessCentralGeek commented on May 18, 2024

Hi, I can´t get pass 'Removing BcContainerHelper' step. Tried from VSCode terminal and from PowerShell with no luck. The image is pulled but the problem is building the container. Tried running 'uninstall-module bccontainerhelper' before the scipt but with no luck.

image

from al-go.

freddydk avatar freddydk commented on May 18, 2024

That seems to be a local problem - a restart of the host will probably solve this.

from al-go.

BusinessCentralGeek avatar BusinessCentralGeek commented on May 18, 2024

Thanks for the quick reply. I´ve already restarted the machine several times, also reinstalled docker. When the error occurs docker wouldn´t start and need to uninstall it again every time it fails to create the container.
With this type of scripts I have no problem and the container works fine:

image

I believe "driver "windowsfilter" failed to remove root
filesystem: failed to detach VHD: failed to detach virtual disk: The device is not ready.: rename"
is the problem but have no clue on how to solve it.
Some more info if it helps:

image

from al-go.

BusinessCentralGeek avatar BusinessCentralGeek commented on May 18, 2024

After reading this thread https://github.com/microsoft/navcontainerhelper/issues/2086

I could finally create it by turning off Windows Defender antivirus... At last..., I should have read the thread and try it sooner.

from al-go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.