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

Bug when npm run test #405

Open
q707132127 opened this issue May 10, 2022 · 7 comments
Open

Bug when npm run test #405

q707132127 opened this issue May 10, 2022 · 7 comments

Comments

@q707132127
Copy link

Hi, I'm trying to build a codap application on my server.
According to the instruction, after run "npm start", I got output like this. But the web page didn't work successfully.

> [email protected] start /home/codap
> npm run codap
> [email protected] codap /home/codap
> sproutcore server --allow-from-ips='*.*.*.*'
SproutCore v1.11.0 Development Server
Allowing access only from IPs: *.*.*.*. Use --allow-from-ips='*.*.*.*' to allow all
Starting server at http://0.0.0.0:4020 in debug mode
To quit sc-server, press Control-C
Thin web server (v1.7.2 codename Bachmanity)
Maximum connections set to 1024
Listening on localhost:4020, CTRL+C to stop

Then I runned "http-server -p 4020", port 4020 can be accessed normally, indicating that it should not be a problem with the network environment. After that, I runned "npm run test", got the following information:

TypeError: undefined is not a function (evaluating 'Object.assign')

  http://localhost:4020/static/dg/en/current/source/core.js?1651823312:116
ReferenceError: Can't find variable: DG

  http://localhost:4020/static/dg/en/current/source/alpha/archive_utils.js?1651823312:30 in global code
ReferenceError: Can't find variable: DG

  http://localhost:4020/static/dg/en/current/source/alpha/browser.js?1651823312:23 in global code
ReferenceError: Can't find variable: DG
……(seems that all the tests got the same error: ReferenceError: Can't find variable: DG)
ReferenceError: Can't find variable: DG

  http://localhost:4020/dg/en/current/tests.html:1880
ReferenceError: Can't find variable: DG

  http://localhost:4020/dg/en/current/tests.html:2540
http://localhost:4020/dg/en/current/tests.html Status:success
status returned is passed: true
All tests passed! 

I don't know how to fix this and get the site to start properly. But it doesn't seem to be a problem with the configuration of the environment, but rather a procedural problem. Hope we can get your help. Thanks a lot!

@jsandoe
Copy link
Member

jsandoe commented May 10, 2022

Hello,

We apologize that you are having difficulties. The current version of CODAP is built on the Sproutcore development environment, which is old and unsupported. We limp along as best we can until our newer version is available.

It is not clear what are wanting to do with the development version of CODAP and a bit unclear what went wrong, so I am going to make three suggestions. I hope one or more of them is helpful.

  1. You may not need a full development environment. If you are not intending to actually modify CODAP itself it may be sufficient to have a local version of CODAP. If so, you can get a zipped copy of the current version of CODAP's current build from https://codap.concord.org/releases/zips/latest.zip. Just download it to your local machine, unzip it, and place it in the filesystem of a web server.
  2. The development server takes some time to run the first time. Your version may, in fact, have run properly. It takes some time, sometimes five or more minutes, to deliver the initial view of CODAP. If you see a blank screen when you access http://0.0.0.0/DG, then this may be the problem. This is because, as I said, the development environment is comparatively ancient. It has to perform some conversions on the source and it is not very efficient. Once the server is running it will deliver pages quite a bit faster, though it can hang.
  3. There may be Ruby incompatibilities with Sproutcore. If you see other errors in the browser when you access http://0.0.0.0/DG, this may be the problem. When the Sproutcore development environment was last under support, it recommended a the latest 1.x version of Ruby. We are able to run CODAP with Ruby 2.4.x.

I hope these suggestions help. If not, please respond with more details about what you are trying to accomplish.

Jonathan Sandoe

@kswenson
Copy link
Member

kswenson commented May 10, 2022 via email

@jsandoe
Copy link
Member

jsandoe commented May 10, 2022

Kirk, I stand corrected. Should by http://0.0.0.0/dg. Thanks

@q707132127
Copy link
Author

q707132127 commented May 11, 2022 via email

@jsandoe
Copy link
Member

jsandoe commented May 14, 2022 via email

@q707132127
Copy link
Author

q707132127 commented May 17, 2022 via email

@jsandoe
Copy link
Member

jsandoe commented Oct 11, 2022 via email

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

3 participants