GithubHelp home page GithubHelp logo

Comments (8)

adammillerio avatar adammillerio commented on May 28, 2024

In trying to fix my issue (#26) I had a similar error arise when trying to run PoshBot using the latest PowerShell available from their GitHub:

WARNING: You are using PSSlack in with .NET Core.  Several features will not work:
 Set-PSSlackConfig cannot serialize tokens or URIs
 [System.Drawing.Color]::SOmeColor shortcut is not available
Cannot find an overload for "GetEnumerator" and the argument count: "0".
At line:1 char:1
+ & 'C:\Users\aemiller\Scripts\Bot\Bot.ps1'
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException

Looks like at least in my case, it is because that version of PowerShell is using .NET Core, which is more stripped down than what ships with full Windows. This is likely a similar issue with yours, as Nano Server probably ships with .NET Core.

from poshbot.

megamorf avatar megamorf commented on May 28, 2024

Yeah, the missing color class error of PSSlack broke my docker build on NanoServer so I had to fix it by changing the ErrorActionPreference prior to importing PoshBot:

# configure shell default parameters
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

# Install PoshBot and create new PoshBot configuration and store it for later use
RUN Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force; \
    Install-Module -Name PoshBot -RequiredVersion $env:PoshBotVersion -Repository PSGallery -Force; \
    $ErrorActionPreference = 'Ignore'; \
    Import-Module -Name PoshBot -ErrorAction SilentlyContinue; \
    $ErrorActionPreference = 'Stop'; \
    New-PoshBotConfiguration | Save-PoshBotConfiguration

from poshbot.

devblackops avatar devblackops commented on May 28, 2024

@megamorf I'm hacking away at some of these bugs in Nano. I squash one, another appears ☚ī¸

It may be a bit before this is fully working on Nano. Have you tried it on Windows 2012R2\2016 or Windows 10? Does it work for you?

from poshbot.

devblackops avatar devblackops commented on May 28, 2024

Aside from the PSSlack issue, I think the Nano Server issues are fixed. I'll try to do some more testing tonight and commit my changes.

from poshbot.

devblackops avatar devblackops commented on May 28, 2024

@megamorf I have published a Docker image of v0.2.2 here. It's also been published to PSGallery.

Can you try running the following?

docker run -it -e SLACK_TOKEN="<YOUR-SLACK-TOKEN>" -e BOT_ADMINS="<YOUR-HANDLE>" -v C:/temp/poshbot_docker_volume/:c:/poshbot_data poshbotio/poshbot-nano-slack:0.2.2

Note the use of the Docker volume. PoshBot will store all configuration in this directory so subsequent invocations should read in the configuration.

from poshbot.

megamorf avatar megamorf commented on May 28, 2024

@devblackops hey, thanks for that 👍 . I'll check it out some time this week.

from poshbot.

RamblingCookieMonster avatar RamblingCookieMonster commented on May 28, 2024

You could suppress the PSSlack warning when importing if desired. I think I'll kill that warning shortly, just need to make sure to document that bit in the readme/about.

Cheers!

from poshbot.

stale avatar stale commented on May 28, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from poshbot.

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.