Git Product home page Git Product logo

Comments (6)

craigmoodie avatar craigmoodie commented on August 19, 2024

Hello,

I installed dcmjs.js using the instructions on your page and it seemed to install properly. However, when I try to call it, I get a massive error output (below). Have you seen anything like this before and do you know how to debug it? I would appreciate the help.

Best,
Craig.


craig$ ./dcmjs.js
./dcmjs.js: line 1: syntax error near unexpected token {Module["noInitialRun"]=1' ./dcmjs.js: line 1:var ENVIRONMENT_IS_WEB=typeof window==="object";var Module=Module||{};if(ENVIRONMENT_IS_WEB){Module["noInitialRun"]=1;Module["noExitRuntime"]=1}var Module;if(!Module)Module=(typeof Module!=="undefined"?Module:null)||{};var moduleOverrides={};for(var key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof require==="function";var ENVIRONMENT_IS_WEB=typeof window==="object";var ENVIRONMENT_IS_WORKER=typeof importScripts==="function";var ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){if(!Module["print"])Module["print"]=function print(x){process["stdout"].write(x+"\n")};if(!Module["printErr"])Module["printErr"]=function printErr(x){process["stderr"].write(x+"\n")};var nodeFS=require("fs");var nodePath=require("path");Module["read"]=function read(filename,binary){filename=nodePath"normalize";var ret=nodeFS"readFileSync";if(!ret&&filename!=nodePath"resolve"){filename=path.join(__dirname,"..","src",filename);ret=nodeFS"readFileSync"}if(ret&&!binary)ret=ret.toString();return ret};Module["readBinary"]=function readBinary(filename){return Module"read"};Module["load"]=function load(f){globalEval(read(f))};if(!Module["thisProgram"]){if(process["argv"].length>1){Module["thisProgram"]=process["argv"][1].replace(//g,"/")}else{Module["thisProgram"]="unknown-program"}}Module["arguments"]=process["argv"].slice(2);if(typeof module!=="undefined"){module["exports"]=Module}process["on"]("uncaughtException",%28function%28ex%29{if%28!%28ex instanceof ExitStatus%29%29{throw ex}}%29)}else if(ENVIRONMENT_IS_SHELL){if(!Module["print"])Module["print"]=print;if(typeof printErr!="undefined")Module["printErr"]=printErr;if(typeof read!="undefined"){Module["read"]=read}else{Module["read"]=function read(){throw"no read() available (jsc?)"}}Module["readBinary"]=function readBinary(f){if(typeof readbuffer==="function"){return new Uint8Array(readbuffer(f))}var data=read(f,"binary");assert(typeof data==="object");return data};if(typeof scriptArgs!="undefined"){Module["arguments"]=scriptArgs}else if(typeof arguments!="undefined"){Module["arguments"]=arguments}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){Module["read"]=function read(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(typeof arguments!="undefined"){Module["arguments"]=arguments}if(typeof console!=="undefined"){if(!Module["print"])Module["print"]=function print(x){console.log(x)};if(!Module["printErr"])Module["printErr"]=function

from dcmjs.

pieper avatar pieper commented on August 19, 2024

You need to run
$ node dcmjs.js

By the way, this is unrelated to the original issue and should have been a new issue (no big deal, but just bookkeeping)

from dcmjs.

craigmoodie avatar craigmoodie commented on August 19, 2024

Hi Pieper,

that actually was the problem! Thanks :)

from dcmjs.

jcfr avatar jcfr commented on August 19, 2024

Hi Craig,

There is a typo in the name: "dcmdump" instead of "dcmpdump"

For more info, see https://github.com/commontk/dcmjs#usage

Hth
Jc

On Wed, Jun 24, 2015 at 12:51 PM, craigmoodie [email protected]
wrote:

So now I'm getting a different error. I'm trying to run dcmdump, but I'm
getting an error that suggests dcmjs can't find it:

$ node dcmjs.js dcmpdump
Unknown application name !
Usage: /Applications/dcmjs-build/dcmjs-build/bin/dcmjs.js [options]


Reply to this email directly or view it on GitHub
#8 (comment).

+1 919 869 8849

from dcmjs.

craigmoodie avatar craigmoodie commented on August 19, 2024

Well that was an easy fix! Thanks :)

from dcmjs.

jcfr avatar jcfr commented on August 19, 2024

Closing. The updated build system now uses dockcross-browser-asmjs and addresses all build issues providing a consistent build environment.

See here for updated instruction: https://github.com/commontk/dcmjs#building

from dcmjs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.