Fork me on GitHub
#clojurescript
<
2020-10-03
>
Galagora22:10:52

Hi. When trying to import a local CommonJS module, I'm getting the error: "ERROR: JSC_PARSE_ERROR. Parse error. Invalid trailing comma in arguments list at /home/ao/code/habit/./src/index.js line 116 : 52. ". However, I set the option :language-in to :es-2017, in which trailing commas are allowed.

Galagora22:10:16

Is there a hello world that uses both JS and CJS source files and Nodejs/NPM that I can copy?

Galagora22:10:47

I also get this error:

Error: Cannot find module '@cljs-oss/module-deps'
Require stack:
- /home/ao/code/habit/[eval]
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:892:15)
    at Function.Module._load (internal/modules/cjs/loader.js:742:27)
    at Module.require (internal/modules/cjs/loader.js:964:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at [eval]:8:13
    at Script.runInThisContext (vm.js:132:18)
    at Object.runInThisContext (vm.js:309:38)
    at Object.<anonymous> ([eval]-wrapper:10:26)
    at Module._compile (internal/modules/cjs/loader.js:1075:30)
    at evalScript (internal/process/execution.js:92:25) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/home/ao/code/habit/[eval]' ]
}

Galagora22:10:56

4 times, which is the number of JS files in the src/ directory. I'm guessing it's caused by the previous error