-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nanoserver: require("sharp") exit with code 4294967295 #3175
Comments
Are you able to get a backtrace of the crash? Perhaps you need to grant additional privileges or permissions to the runtime environment. |
Sorry I do not know how to get the backtrace. Using |
I don't have access to Windows hardware to help debug this but hopefully someone else using the same bleeding-edge setup can help. As you say, it's likely there's something missing as |
After some googling I think this maybe something with |
The libvips Windows binaries no longer link against I could not reproduce this using this Dockerfile: DetailsFROM mcr.microsoft.com/powershell:nanoserver-20h2
ARG NODE_VERSION=16.14.2
SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
WORKDIR /build
ADD https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-win-x64.zip node-v${NODE_VERSION}-win-x64.zip
RUN Expand-Archive node-v$env:NODE_VERSION-win-x64.zip $env:ProgramFiles; \
Rename-Item $env:ProgramFiles\node-v$env:NODE_VERSION-win-x64 nodejs; \
Remove-Item node-v$env:NODE_VERSION-win-x64.zip;
USER ContainerAdministrator
RUN setx PATH $($env:PATH + \";$env:ProgramFiles\nodejs\") /M
USER ContainerUser
WORKDIR /app
RUN npm install --verbose sharp; \
node -p \"require('sharp')\"
ADD https://wsrv.nl/zebra.jpg zebra.jpg
RUN node -e \"require('sharp')('zebra.jpg').toFile('x.png')\" |
Thanks, upgrading to 20h2 does work. It's just 1903 having a stroking right now. Closed as this can be solved by updating windows. |
Possible install-time or require-time problem
npm install
is the same as the architecture and platform of Node.js used at runtime.Are you using the latest version of sharp?
sharp
as reported bynpm view sharp dist-tags.latest
.If you cannot confirm this, please upgrade to the latest version and try again before opening an issue.
If you are using another package which depends on a version of
sharp
that is not the latest, please open an issue against that package instead.Is this a problem with filesystem permissions?
If you are using npm v6 or earlier and installing as a
root
orsudo
user, have you tried with thenpm install --unsafe-perm
flag?If you are using npm v7 or later, does the user running
npm install
own the directory it is run in?If you are using the
ignore-scripts
feature ofnpm
, have you tried with thenpm install --ignore-scripts=false
flag?What is the complete output of running
npm install --verbose sharp
?What is the output of running
npx envinfo --binaries --system --npmPackages=sharp --npmGlobalPackages=sharp
?Dockerfile
Error Message
The command 'pwsh -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; node -e "console.log('hello')"; node -e "console.log(require('sharp'))";' returned a non-zero code: 4294967295: failed to shutdown container: container d17da3bf922b565b9cf7c95b3b62eed11619dd32558073f9a9c913b9832f5498 encountered an error during hcsshim::System::Shutdown: failure in a Windows system call: The connection with the virtual machine or container was closed. (0xc037010a): subsequent terminate failed container d17da3bf922b565b9cf7c95b3b62eed11619dd32558073f9a9c913b9832f5498 encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The connection with the virtual machine or container was closed. (0xc037010a)
The text was updated successfully, but these errors were encountered: