← All tasks
javascriptacornjs/acorn #1007Not a task: not reproduced

Error: MODULE_NOT_FOUND

envgap__acornjs__acorn-1007

01 / FAILURE SIGNATURE

As reported upstream

Error: No valid exports main found for '/Users/user/Documents/JuanBot/node_modules/acorn'
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
aa0ccb41a39f3967aa31858105167af35d2f52a6
Manifest
acorn-loose/package.json
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

acornjs/acorn #1007 · read the original issue
Hello,



Any attempt to use acorn, results in the following:



```

Error: No valid exports main found for '/Users/user/Documents/JuanBot/node_modules/acorn'

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

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

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

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

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

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

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

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

    at Object.<anonymous> (/Users/user/Documents/JuanBot/redirect.js:3:18)

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

  code: 'MODULE_NOT_FOUND'

```



Code:



```

const cheerio = require("cheerio")

const {Parser} = require("acorn")

let $ = cheerio.load(responseText)

let text = $("body > script").html()

console.log(Parser.parse(text, {ecmaVersion: 2020}))

```
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
[]