Skip to content
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

Can't setup devcontainer setup.mjs permission denied #20

Open
Zehir opened this issue Feb 9, 2023 · 1 comment
Open

Can't setup devcontainer setup.mjs permission denied #20

Zehir opened this issue Feb 9, 2023 · 1 comment

Comments

@Zehir
Copy link

Zehir commented Feb 9, 2023

Hello,

I tried to use this template in Github codespace and on my computer but I get the same errors message:

�[K�[?25h2023-02-09 23:26:29.751Z: 
added 53 packages, and audited 54 packages in 10s
2023-02-09 23:26:29.764Z: 
10 packages are looking for funding
  run `npm fund` for details
2023-02-09 23:26:29.777Z: 
found 0 vulnerabilities
2023-02-09 23:26:29.796Z: npm notice 
npm notice New major version of npm available! 8.19.3 -> 9.4.2
npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.4.2
npm notice Run npm install -g [email protected] to update!
npm notice 
2023-02-09 23:26:29.833Z: /bin/sh: 1: ./.devcontainer/setup.mjs: Permission denied
2023-02-09 23:26:29.852Z: postCreateCommand failed with exit code 126. Skipping any further user-provided commands.

2023-02-09 23:26:29.859Z: Error: Command failed: /bin/sh -c npm i zx --location=global && ./.devcontainer/setup.mjs
2023-02-09 23:26:29.861Z:     at vN (/usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js:1708:130)
2023-02-09 23:26:29.863Z:     at processTicksAndRejections (internal/process/task_queues.js:95:5)
2023-02-09 23:26:29.869Z:     at async Promise.all (index 0)
2023-02-09 23:26:29.870Z:     at async Dg (/usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js:1700:3617)
2023-02-09 23:26:29.873Z:     at async xg (/usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js:1700:2831)
2023-02-09 23:26:29.894Z:     at async Th (/usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js:1700:2368)
2023-02-09 23:26:29.896Z:     at async hie (/usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js:1915:1633)
2023-02-09 23:26:29.901Z:     at async P7 (/usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js:1915:1255)
2023-02-09 23:26:29.913Z:     at async Fie (/usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js:1921:2093)
2023-02-09 23:26:29.915Z:     at async $f (/usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js:1921:3239)
2023-02-09 23:26:29.924Z: {"outcome":"error","message":"Command failed: /bin/sh -c npm i zx --location=global && ./.devcontainer/setup.mjs","description":"The postCreateCommand in the devcontainer.json failed.","containerId":"someID"}
2023-02-09 23:26:29.930Z: devcontainer process exited with exit code 1
@Zehir
Copy link
Author

Zehir commented Feb 9, 2023

There is 2 avaliable way to fix this :

  "postCreateCommand": "npm i zx --location=global && chmod +x ./.devcontainer/setup.mjs && ./.devcontainer/setup.mjs",
  "postCreateCommand": "npm i zx --location=global && zx ./.devcontainer/setup.mjs",

I don't know which one you want to use

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant