Skip to content

lesson 1: Error: Cannot find module '.../dist/index.js' #5

Open
@Vince2301

Description

@Vince2301

In lesson 1, I get this error

yarn start
yarn run v1.16.0
$ node dist/index.js
internal/modules/cjs/loader.js:626
    throw err;
    ^

Error: Cannot find module '/Users/vincentleleux/introg/dist/index.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:623:15)
    at Function.Module._load (internal/modules/cjs/loader.js:527:27)
    at Function.Module.runMain (internal/modules/cjs/loader.js:837:10)
    at internal/main/run_main_module.js:17:11 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
error Command failed with exit code 1.

There is indeed no dist folder and the package.json got this line :
"start": "node dist/index.js"

so why is it not throwing an error for you ?

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