Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError when trying to compile/run project locally. #35

Open
respatialized opened this issue Apr 17, 2022 · 2 comments
Open

TypeError when trying to compile/run project locally. #35

respatialized opened this issue Apr 17, 2022 · 2 comments

Comments

@respatialized
Copy link

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.

@loganpowell
Copy link
Owner

@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
Copy link
Owner

try npx shadow-cljs release lib

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants