Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

npm error Cannot find module #1759

Open
rubengr opened this issue Jul 22, 2023 · 1 comment
Open

npm error Cannot find module #1759

rubengr opened this issue Jul 22, 2023 · 1 comment

Comments

@rubengr
Copy link

rubengr commented Jul 22, 2023

Hi,

I'm trying to run this container in my pc and don't works. The container works, but npm doesn't.
It gives this error:

image

In other pc the same project runs correctly. Also i tried the dev container node example and npm works.

dev container:

{
	"name": "Node.js",
	// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
	"image": "mcr.microsoft.com/devcontainers/javascript-node:1-20-bullseye",

	// Features to add to the dev container. More info: https://containers.dev/features.
	"features": {
		"ghcr.io/devcontainers/features/git:1": {}
	},

	// Use 'forwardPorts' to make a list of ports inside the container available locally.
	// "forwardPorts": [],

	// Use 'postCreateCommand' to run commands after the container is created.
	"postCreateCommand": "npm install",

	// Configure tool-specific properties.
	// "customizations": {},

	// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
	// "remoteUser": "root"
}
  • VSCode Version:
    Version: 1.80.1 (user setup)
    Commit: 74f6148eb9ea00507ec113ec51c489d6ffb4b771
    Date: 2023-07-12T17:22:07.651Z
    Electron: 22.3.14
    ElectronBuildId: 21893604
    Chromium: 108.0.5359.215
    Node.js: 16.17.1
    V8: 10.8.168.25-electron.0
    OS: Windows_NT x64 10.0.22621
@KevinBonnoron
Copy link

Had the same issue this morning (with vscode version 1.83.1 on ubuntu 22.04). This seems to be related to this issue : microsoft/vscode-remote-release#5516

After setting the Debug auto attach to false and rebuild the container i can now use npm/yarn.

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

No branches or pull requests

2 participants