-
Notifications
You must be signed in to change notification settings - Fork 166
Closed
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is neededreleased
Description
I'm trying to include the devcontainer command in my Docker image. I extend a Next.js a standalone build by setting outputFileTracingIncludes to the results of nodeFileTrace() for the additional binaries I want to bundle.
Anyway, the issue is easily reproducable by installing @devcontainers/cli locally and then:
$ node_modules/.bin/nft print node_modules/.bin/devcontainer
FILELIST:
node_modules/.bin/devcontainer
node_modules/@devcontainers/cli/devcontainer.js
WARNINGS:
Error: Failed to resolve dependency "./dist/spec-node/devContainersSpecCLI":
Cannot find module '/home/dev/vibe-web/node_modules/.bin/dist/spec-node/devContainersSpecCLI' loaded from /home/dev/vibe-web/node_modules/.bin/devcontainer
As usual, node_modules/.bin/devcontainer is just a symlink to ../@devcontainers/cli/devcontainer.js, which is really just:
#!/usr/bin/env node
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
require('./dist/spec-node/devContainersSpecCLI');Seemingly, this relative path should be evaluated based on the actual file location / symlink target (../@devcontainers/cli/). Here's the test that it would work (despite some strange warnings that I assume to be caused by some settings in the nft CLI):
$ node_modules/.bin/nft print node_modules/.bin/../@devcontainers/cli/devcontainer.js
Skipping asset emission of /home/dev/vibe-web/*/* for /home/dev/vibe-web/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js as it is outside the package base /home/dev/vibe-web/node_modules/@devcontainers/cli
Skipping asset emission of /home/dev/vibe-web/*/* for /home/dev/vibe-web/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js as it is outside the package base /home/dev/vibe-web/node_modules/@devcontainers/cli
Skipping asset emission of /home/dev/vibe-web/*/* for /home/dev/vibe-web/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js as it is outside the package base /home/dev/vibe-web/node_modules/@devcontainers/cli
Skipping asset emission of /tmp for /home/dev/vibe-web/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js as it is outside the package base /home/dev/vibe-web/node_modules/@devcontainers/cli
FILELIST:
node_modules/@devcontainers/cli/devcontainer.js
node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js
node_modules/@devcontainers/cli/package.json
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is neededreleased