Skip to content

[Task] Add error for module is not in cache '@lenra/app' #58

Description

@shiipou

What should be done

Add a better error message when this error happen. You can try it using this code : https://github.com/lenra-io/app-stat-us/tree/ae4d8a0e3dfeca3e508015c344491ee8adbd1f4f

Indexing /home/shiishii/dev/github.com/lenra-io/app-stat-us/src/views/pages/post.js
node:internal/modules/esm/module_job:131
        this.module.instantiate();
                    ^
Error: request for '@lenra/app' is not in cache
    at ModuleJob._instantiate (node:internal/modules/esm/module_job:131:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:213:5)
    at async ModuleLoader.import (node:internal/modules/esm/loader:316:24)
    at async JavaScriptIndexer.indexFile (file:///home/shiishii/dev/github.com/lenra-io/app-stat-us/node_modules/@lenra/app/dist/lib/indexer.js:76:24)
    at async Promise.all (index 2)
    at async JavaScriptIndexer.indexDirectory (file:///home/shiishii/dev/github.com/lenra-io/app-stat-us/node_modules/@lenra/app/dist/lib/indexer.js:72:17)
    at async Promise.all (index 1)
    at async JavaScriptIndexer.indexDirectory (file:///home/shiishii/dev/github.com/lenra-io/app-stat-us/node_modules/@lenra/app/dist/lib/indexer.js:72:17)
    at async JavaScriptIndexer.index (file:///home/shiishii/dev/github.com/lenra-io/app-stat-us/node_modules/@lenra/app/dist/lib/indexer.js:46:23)
    at async Indexer.index (file:///home/shiishii/dev/github.com/lenra-io/app-stat-us/node_modules/@lenra/app/dist/lib/indexer.js:121:9) {
  code: 'ERR_VM_MODULE_LINK_FAILURE'
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status
    🟤 Can wait

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions