Comments (6)
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.
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.
Hi Pieper,
that actually was the problem! Thanks :)
from dcmjs.
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.
Well that was an easy fix! Thanks :)
from dcmjs.
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)
- can't build on mac - missing 'python2' executable HOT 1
- second invocation of make causes new things to build HOT 1
- Link to www.dcmjs.org in README.md is broken HOT 1
- Can't build on ubuntu 14.04 HOT 1
- File not found in node environment. HOT 7
- Build errors with libxml2 HOT 13
- libxml2 error on macOS HOT 5
- Build wasm module HOT 4
- Fix build with BUILD_dsr2xml_APP set to ON HOT 1
- dcmjs.js compiled by myself seems doesn't work on client side. HOT 10
- How to use this in NodeJS? Using `require('./dcmjs/dcmjs')` is failing HOT 8
- Fix CMP0074 policy warning
- dcmsend can not open tcp connection HOT 2
- Build error for dcmj2pnm HOT 2
- Any on going work on this project? HOT 3
- Build fails on M1 Mac
- emscripten FS doc does not mention readdir
- gzip invalid option
- Re-factor demos onto a single page using boostrap
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dcmjs.