census-geojson icon indicating copy to clipboard operation
census-geojson copied to clipboard

`TypeError` when trying to compile/run project locally.

Open respatialized opened this issue 2 years ago • 2 comments

I am trying to get set up with the project's test suite and a REPL connected to the ClojureScript environment, but I cannot run the project from a local build.

Note: I am a relative novice when it comes to ClojureScript in general and shadow-cljs in particular, so there may be a lot I'm missing here. But here's a minimal number of steps to reproduce the issue I keep encountering:

Steps to reproduce the problem

  1. clone the project
  2. run npm install from the project root to grab the dependencies
  3. run npx shadow-cljs compile lib to compile the library code
  4. run node public/census/test/index.js to test the library code

Here's the error that results:

$ node public/census/test/index.js 
SHADOW import error /path/to/census-geojson/public/census/cljs-runtime/ajax.xml_http_request.js

/path/to/census-geojson/public/census/census.js:70
  /* ignore this, look at stacktrace */ fn.call(global, require, module, __filename, __dirname);
                                           ^
TypeError: Cannot read property 'set' of undefined
    at /path/to/census-geojson/public/census/cljs-runtime/ajax/xml_http_request.cljs:31:5
    at /path/to/census-geojson/public/census/cljs-runtime/ajax.xml_http_request.js:32:3
    at global.SHADOW_IMPORT (/path/to/census-geojson/public/census/census.js:70:44)
    at /path/to/census-geojson/public/census/census.js:1665:1    at /path/to/census-geojson/public/census/census.js:5:26
    at Object.<anonymous> (/path/to/census-geojson/public/census/census.js:9:3)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)

Please let me know if I need to clarify anything, or if there are any additional project setup pitfalls that I may encounter here.

respatialized avatar Apr 17 '22 15:04 respatialized

@respatialized very sorry for the delayed response.

Perhaps it might be easier if we set up a quick peer programing environment and get you set up via zoom/meet/etc. Would that work for you?

loganpowell avatar Apr 20 '22 13:04 loganpowell

try npx shadow-cljs release lib

loganpowell avatar Apr 20 '22 13:04 loganpowell