lforms-fhir-app icon indicating copy to clipboard operation
lforms-fhir-app copied to clipboard

Startup Fails

Open mosiermt opened this issue 5 years ago • 13 comments

I followed the startup instructions in the readme, but when I try to run npm start, I get two errors. the first was easy to overcome. The start up script is being rendered as one line and the entire script gets put into the echo. Removing the echo command starts up the server, but when I navigate to the page 'localhost:8000/lforms-fhir-app/' all I am prompted with is the word "app".

My start up commands were to clone the git hub, then in the terminal run 'npm ci' and 'npm start'.

Is there some configuration error I am missing? I am very new to this framework, so I wouldn't be surprised if there was something simple I am missing.

mosiermt avatar Aug 05 '19 18:08 mosiermt

It worked fine in my test. Please let me know if you see "app/bower_components" after "npm ci" is run and what is in the directory of "/node_modules/.bin". Try to run the commands in bash if you are not using bash.

lhcye avatar Aug 06 '19 15:08 lhcye

My app/bower_components file is populated, and /node_modules/.bin contains two files for each of the modules. I tried running npm ci and npm start in bash, yet I still cant open the web page. Using the developer tools in the browser, I can see that the page is trying to load the scripts and css files from "/lforms-fhir-app/bower_components" as opposed to "/app/bower_components". It definitely seems that the softlink file is not working correctly on my machine. Do softlinks not work in windows 10?

Edit: If I change the base href tag in the index.html page, It gets a 200 on all of the dependencies, however the page still doesn't render.

mosiermt avatar Aug 06 '19 15:08 mosiermt

I was not aware you were on Windows. We have not tested it on Windows. It should have about 40 files in /node_modules/.bin. Let me see if I can set up a dev environment here.

lhcye avatar Aug 06 '19 17:08 lhcye

I count 80 files in my folder. 40 pairs of .cmd files paired with files with no extension.

mosiermt avatar Aug 06 '19 19:08 mosiermt

I have not tried it, but I think the softlink file (created in Linux) is not going to work in Windows. The reason we have that link is because when the website runs as a GitHub Pages website, the URL includes /lforms-fhir-app/ (the project name), so when running in development, we tried to keep the URL the same by pointing that path to "app". I think it might be possible to find a solution that does not require a softlink and still works in development and production (but I am not certain). Anyway, if you are able to find something that works, we would welcome a pull request.

plynchnlm avatar Aug 09 '19 17:08 plynchnlm

Hello,

I'm trying to setup this package in my local Windows machine and I don't see app/bower-components populated after running npm ci command. Also when I run npm run build I'm getting an error saying:

[email protected] build:pages node -e '(new (require("ssi"))("source/html-ssi", ".tmp", "/*.html", true)).compile()'

'(new ^^^^^

SyntaxError: Invalid or unexpected token at new Script (node:vm:100:7) at createScript (node:vm:259:10) at Object.runInThisContext (node:vm:307:10) at node:internal/process/execution:79:19 at eval-wrapper:6:22 at evalScript (node:internal/process/execution:78:60) at node:internal/main/eval_string:28:3

RAMMETTLES avatar Dec 28 '23 21:12 RAMMETTLES

The current version of lforms-fhir-app does not use bower. The build command works on Linux, and we don't normally test Windows, though I would prefer it work there as well. Does node -e '(new (require("ssi"))("source/html-ssi", ".tmp", "/*.html", true)).compile()' from a DOS command prompt? Which version of node are you using?

BTW, next time please open a new issue. This one is four years old and the cause of the problem is likely different.

plynchnlm avatar Jan 05 '24 16:01 plynchnlm

I have the same issue under Windows 11 node -e '(new (require("ssi"))("source/html-ssi", ".tmp", "/*.html", true)).compile()' throwas an error.

This Error to be exact:

[eval]:1
(new (require(ssi))(source/html-ssi, .tmp, /*.html, true)).compile()
                                     ^

SyntaxError: Unexpected token '.'
    at new Script (node:vm:100:7)
    at createScript (node:vm:259:10)
    at Object.runInThisContext (node:vm:307:10)
    at node:internal/process/execution:79:19
    at [eval]-wrapper:6:22
    at evalScript (node:internal/process/execution:78:60)
    at node:internal/main/eval_string:28:3

burningSchadow42 avatar Feb 19 '24 16:02 burningSchadow42

It looks like swapping the single and double quotes in the string will make it work.

plynchnlm avatar Feb 20 '24 16:02 plynchnlm

Thanks for the answer. Switching the quotes in the package.json solved that problem. But I found 3 different problems under windows. One of which I haven't found a work around. Does it make any sense to make a new issue about it?

burningSchadow42 avatar Feb 27 '24 10:02 burningSchadow42

I would be interested in hearing what the problems are, and if they aren't "startup problems" as this ticket is labeled, then I would recommend opening a new one. Within the next couple of weeks we are planning to make an effort to get this package running on Windows, though that schedule could easily slip. Anyway, it is on our list of things to fix "soon".

plynchnlm avatar Feb 27 '24 20:02 plynchnlm

I managed to get it to work locally on my Windows 11 machine. Since my work arounds are far from ideal, creating a pull request is most likely useless and I created a ticket with my findings instead. Hope that helps.

burningSchadow42 avatar Feb 27 '24 21:02 burningSchadow42

Yes, that is helpful. Thank you for taking the time to do that.

plynchnlm avatar Feb 27 '24 21:02 plynchnlm

Windows support is added with latest version 3.3.0.

jcy1225 avatar May 01 '24 19:05 jcy1225