← All tasks
javascriptai/nanoid #215Not a task: already works

Error: No valid exports main found for '/path/to/nanoid'

envgap__ai__nanoid-215

01 / FAILURE SIGNATURE

As reported upstream

Error: No valid exports main found for '/Users/cansin/code/nanoid-reprod/node_modules/nanoid'
Not a benchmark task.
  • The project already builds and runs before the fix, so there is nothing to repair.

02 / ENVIRONMENT RECIPE

Base commit
97cece94d011b19ada958911b50ec7e249a2719c
Manifest
package.json
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

ai/nanoid #215 · read the original issue
As initially described at https://github.com/ai/nanoid/issues/206#issuecomment-622967848 , I am getting a `MODULE_NOT_FOUND` error with `node@13.2.0` and `yarn@1.22.4`. 



Here is the repro: https://github.com/cansin/nanoid-module-not-found-repro



And a sample run on my local: 



```bash

cansin@localhost nanoid-repro % node --version

v13.2.0

cansin@localhost nanoid-repro % yarn --version

1.22.4

cansin@localhost nanoid-repro % yarn install

yarn install v1.22.4

[1/5] 🔍  Validating package.json...

[2/5] 🔍  Resolving packages...

[3/5] 🚚  Fetching packages...

[4/5] 🔗  Linking dependencies...

[5/5] 🔨  Building fresh packages...



✨  Done in 0.09s.

cansin@localhost nanoid-repro % node index.js 

internal/modules/cjs/loader.js:614

  throw e;

  ^



Error: No valid exports main found for '/Users/cansin/code/nanoid-reprod/node_modules/nanoid'

    at resolveExportsTarget (internal/modules/cjs/loader.js:611:9)

    at applyExports (internal/modules/cjs/loader.js:492:14)

    at resolveExports (internal/modules/cjs/loader.js:541:12)

    at Function.Module._findPath (internal/modules/cjs/loader.js:643:22)

    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:941:27)

    at Function.Module._load (internal/modules/cjs/loader.js:847:27)

    at Module.require (internal/modules/cjs/loader.js:1016:19)

    at require (internal/modules/cjs/helpers.js:69:18)

    at Object.<anonymous> (/Users/cansin/code/nanoid-reprod/index.js:1:20)

    at Module._compile (internal/modules/cjs/loader.js:1121:30) {

  code: 'MODULE_NOT_FOUND'

}

```

Thanks.
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]