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

[BUG]: Command Palette not recognizing 'freeCodeCamp: Run Course' #67

Open
Dors-Coding-School opened this issue Oct 14, 2022 · 21 comments

Comments

@Dors-Coding-School
Copy link

Issue/Experience

I did all the instructions you mentioned to set up my environment for Web3, but it was not displaying on the command palette "freeCodeCamp: Run Course".

I was able to fix it by downloading the extension of 'freeCodeCamp - Courses' in my VS Code. It would be nice if you mention this hint if people get stuck like I was.

@ShaunSHamilton
Copy link
Member

Hello there,

This should not happen. When opening bug reports, please follow the given template to provide the necessary details:

Output of running node tooling/camper-info.js from the workspace root

@moT01
Copy link
Member

moT01 commented Feb 14, 2023

That extension is one of the last things added to the container. It can look like everything is finished, but it may still be installing that - so the command doesn't always show up right away. If you wait a second, it should finish installing and be there.

Although, that doesn't really sound like what happened here since you manually installed the extension. Probably would have seen that the installation was in progress.

@duartenunes86
Copy link

It's not working
image

@ShaunSHamilton
Copy link
Member

@duartenunes86 I suggest opening a new issue for your issue, as it does not look the same.

Your workspace does not look correct - the container should not contain a web3-curriculum in the workdir, it should have web3-curriculum/ as the workdir. Also, the "Docker in Docker" bit does not look correct - where is that coming from?

@duartenunes86
Copy link

Here is the web3-curriculum in the image.....when I was setting up the things asked me if I wanted alpine, docker, etc

image

@DevChaudhary78
Copy link

DevChaudhary78 commented Apr 8, 2024

Heya everyone, I am just curios, is anyone able to find any solution for this?

I am unable to run the project as it is not showing freeCodeCamp: Run Course

@ShaunSHamilton
Copy link
Member

@DevChaudhary78 I am still unable to reproduce any issue here. So, if you can provide any more information (dev container build logs, or similar), then that might help debugging.

@DevChaudhary78
Copy link

DevChaudhary78 commented Apr 9, 2024

Hello and Good Afternoon @ShaunSHamilton, thanks for responding quickly, and sorry for the delay from my end.

I've pasted my logs on https://ctxt.io/2/AADIvF0qFg, though there isn't anything that might help according to me as it successfully builds everything.

The only weird thing I found when opening the code in vscode using code . in the web3-curriculum directory, is that it is not showing any files in the vscode explorer, and funny enough I can see all the files in the terminal.

explorer

One more thing which I should mention and might be helpful is that whenever I run Dev Containers: Rebuild and Reopen in Container, it asks me these questions shown below in the image.

docker_config_question

PS: I am using WSL2 with Ubuntu on Windows 10

I hope I've provided a good understanding of the situation, if not please feel free to ask follow-up questions.

Thanks and appreciate your efforts, and have a good day (:

@ShaunSHamilton
Copy link
Member

it is not showing any files in the vscode explorer

This is expected, because we have a .vscode/settings.json config to hide "unnecessary" files for the duration of the course.

whenever I run Dev Containers: Rebuild and Reopen in Container, it asks me these questions shown below in the image.

This is annoying, and is a bug with the Dev Containers extension that pops up every now and again: freeCodeCamp/solana-curriculum#126

If you can try downgrading the extension until it works?


As for the logs, they do not look complete. Perhaps fixing the dev containers extension issue will resolve this. Otherwise, a rebuild without cache might help.

Sorry for the annoyances.

@DevChaudhary78
Copy link

DevChaudhary78 commented Apr 9, 2024

Hello @ShaunSHamilton, thanks for your response.

If you can try downgrading the extension until it works?

Is there any specific version, which can help? I've tried the last 4 versions, and nothing seems to be working.

Thanks

@ShaunSHamilton
Copy link
Member

ShaunSHamilton commented Apr 10, 2024

@DevChaudhary78 Sorry. My message was not very helpful. Try downgrading to 0.309.0:

freeCodeCamp/near-curriculum#57 (comment)

@mena234
Copy link

mena234 commented Apr 10, 2024

Same issue here.

@DevChaudhary78
Copy link

No worries @ShaunSHamilton, thanks a lot for all your help, it finally worked for me. So the culprit was the dev containers plugin all along, and downgrading it to 0.309.0 worked for me.

Have a great day.

@mena234
Copy link

mena234 commented Apr 10, 2024

@ShaunSHamilton
I got this error when I downgraded to 0.309.0 and then run Dev Containers: Rebuild and Reopen in Container
image

@DevChaudhary78
Copy link

Hello @mena234, could you please provide logs for this?

@mena234
Copy link

mena234 commented Apr 10, 2024

@DevChaudhary78
Sure this is these are the logs, it looks like it complains about couldn't find /workspace/web3-curriculum/package.json

=> ERROR [dev_container_auto_added_stage_label 19/19] RUN cd /workspace/web3-curriculum && npm install                                                        0.8s
[2024-04-10T19:33:10.909Z] 
------
> [dev_container_auto_added_stage_label 19/19] RUN cd /workspace/web3-curriculum && npm install:
0.777 npm ERR! code ENOENT
0.778 npm ERR! syscall open
0.778 npm ERR! path /workspace/web3-curriculum/package.json
0.779 npm ERR! errno -2
0.780 npm ERR! enoent Could not read package.json: Error: ENOENT: no such file or directory, open '/workspace/web3-curriculum/package.json'
0.780 npm ERR! enoent This is related to npm not being able to find a file.
0.781 npm ERR! enoent
0.782
0.782 npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-04-10T19_33_10_602Z-debug-0.log
------
Dockerfile-with-features:53
--------------------
 51 |     WORKDIR ${HOMEDIR}
 52 |
 53 | >>> RUN cd ${HOMEDIR} && npm install
 54 |
 55 |
--------------------
ERROR: failed to solve: process "/bin/sh -c cd ${HOMEDIR} && npm install" did not complete successfully: exit code: 254

View build details: docker-desktop://dashboard/build/default/default/o86u629fhq2ibup9ku9s84z8c
[2024-04-10T19:33:11.003Z] Stop (535608 ms): Run: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f C:\Users\menan\AppData\Local\Temp\devcontainercli\container-features\0.58.0-1712777055393\Dockerfile-with-features -t vsc-web3-curriculum-eb7aa6607fdbf11fe30a4ca6fb121d2f7c71307b1ac66f60103a6b35f209f27a --target dev_containers_target_stage --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label c:\Users\menan\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-containers\configs\web3-curriculum
[2024-04-10T19:33:11.021Z] Error: Command failed: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f C:\Users\menan\AppData\Local\Temp\devcontainercli\container-features\0.58.0-1712777055393\Dockerfile-with-features -t vsc-web3-curriculum-eb7aa6607fdbf11fe30a4ca6fb121d2f7c71307b1ac66f60103a6b35f209f27a --target dev_containers_target_stage --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label c:\Users\menan\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-containers\configs\web3-curriculum
[2024-04-10T19:33:11.021Z]     at ptA (c:\Users\menan\.vscode\extensions\ms-vscode-remote.remote-containers-0.354.0\dist\spec-node\devContainersSpecCLI.js:465:1933)
[2024-04-10T19:33:11.021Z]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[2024-04-10T19:33:11.021Z]     at async Pm (c:\Users\menan\.vscode\extensions\ms-vscode-remote.remote-containers-0.354.0\dist\spec-node\devContainersSpecCLI.js:464:1841)
[2024-04-10T19:33:11.022Z]     at async kH (c:\Users\menan\.vscode\extensions\ms-vscode-remote.remote-containers-0.354.0\dist\spec-node\devContainersSpecCLI.js:464:610)
[2024-04-10T19:33:11.022Z]     at async UtA (c:\Users\menan\.vscode\extensions\ms-vscode-remote.remote-containers-0.354.0\dist\spec-node\devContainersSpecCLI.js:481:3692)
[2024-04-10T19:33:11.022Z]     at async $C (c:\Users\menan\.vscode\extensions\ms-vscode-remote.remote-containers-0.354.0\dist\spec-node\devContainersSpecCLI.js:481:4807)
[2024-04-10T19:33:11.022Z]     at async QrA (c:\Users\menan\.vscode\extensions\ms-vscode-remote.remote-containers-0.354.0\dist\spec-node\devContainersSpecCLI.js:661:13255)
[2024-04-10T19:33:11.022Z]     at async urA (c:\Users\menan\.vscode\extensions\ms-vscode-remote.remote-containers-0.354.0\dist\spec-node\devContainersSpecCLI.js:661:12996)
[2024-04-10T19:33:11.035Z] Stop (536459 ms): Run: C:\Users\menan\AppData\Local\Programs\Microsoft VS Code\Code.exe c:\Users\menan\.vscode\extensions\ms-vscode-remote.remote-containers-0.354.0\dist\spec-node\devContainersSpecCLI.js up --user-data-folder c:\Users\menan\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-containers\data --container-session-data-folder /tmp/devcontainers-1caf563a-6a4a-4d67-8fef-315232af362b1712777052623 --workspace-folder d:\Blockchain\Projects\web3-curriculum --workspace-mount-consistency cached --id-label devcontainer.local_folder=d:\Blockchain\Projects\web3-curriculum --id-label devcontainer.config_file=c:\Users\menan\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-containers\configs\web3-curriculum\.devcontainer\devcontainer.json --log-level debug --log-format json --config c:\Users\menan\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-containers\configs\web3-curriculum\.devcontainer\devcontainer.json --default-user-env-probe loginInteractiveShell --remove-existing-container --mount type=volume,source=vscode,target=/vscode,external=true --mount type=bind,source=\\wsl.localhost\Ubuntu-22.04\mnt\wslg\runtime-dir\wayland-0,target=/tmp/vscode-wayland-0bea60cb-201b-4576-9f99-8f77077d6789.sock --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root --terminal-columns 164 --terminal-rows 15
[2024-04-10T19:33:11.036Z] Exit code 1
[2024-04-10T19:33:11.038Z] Command failed: C:\Users\menan\AppData\Local\Programs\Microsoft VS Code\Code.exe c:\Users\menan\.vscode\extensions\ms-vscode-remote.remote-containers-0.354.0\dist\spec-node\devContainersSpecCLI.js up --user-data-folder c:\Users\menan\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-containers\data --container-session-data-folder /tmp/devcontainers-1caf563a-6a4a-4d67-8fef-315232af362b1712777052623 --workspace-folder d:\Blockchain\Projects\web3-curriculum --workspace-mount-consistency cached --id-label devcontainer.local_folder=d:\Blockchain\Projects\web3-curriculum --id-label devcontainer.config_file=c:\Users\menan\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-containers\configs\web3-curriculum\.devcontainer\devcontainer.json --log-level debug --log-format json --config c:\Users\menan\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-containers\configs\web3-curriculum\.devcontainer\devcontainer.json --default-user-env-probe loginInteractiveShell --remove-existing-container --mount type=volume,source=vscode,target=/vscode,external=true --mount type=bind,source=\\wsl.localhost\Ubuntu-22.04\mnt\wslg\runtime-dir\wayland-0,target=/tmp/vscode-wayland-0bea60cb-201b-4576-9f99-8f77077d6789.sock --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root --terminal-columns 164 --terminal-rows 15
[2024-04-10T19:33:11.038Z] Exit code 1

@DevChaudhary78
Copy link

DevChaudhary78 commented Apr 10, 2024

@mena234
Seems like it, perhaps could you please try to remove the whole project and re-clone it?

@mena234
Copy link

mena234 commented Apr 10, 2024

@DevChaudhary78
I did that multiple times, deleting the docker container and images, and clearing the cache but nothing worked.

@DevChaudhary78
Copy link

DevChaudhary78 commented Apr 10, 2024

@mena234
Interesting, do you get package.json in your root directory after cloning it again?

@mena234
Copy link

mena234 commented Apr 10, 2024

@DevChaudhary78
Yes, it already exists.
I'm not a docker expert, but I accessed the container, and entered the workspace/web3-curriculum and I found it is totally empty!
After doing some debugging, I found out that there are two folders workspace and workspaces, and the web3-curriculum project under the workspaces folder is the one that contains the files.

I added s after workspace in the Dockerfile

ARG HOMEDIR=/workspaces/$REPO_NAME

But still gives me the same error somehow!
I commented the RUN cd ${HOMEDIR} && npm install command, and finally, the container was created successfully, and then I ran npm install inside the container manually.
After all that the freeCodeCamp: Run Course is still not exist in the command palette. 😅

@mena234
Copy link

mena234 commented Apr 10, 2024

@DevChaudhary78
These are the logs when I try to downgrade to v0.309.0
https://ctxt.io/2/AADIbIdmFg

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

6 participants