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

npm error Cannot find module #1759

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions