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

Windows isn't passing ENV vars properly #35

Open
tshelburne opened this issue Apr 13, 2018 · 0 comments
Open

Windows isn't passing ENV vars properly #35

tshelburne opened this issue Apr 13, 2018 · 0 comments
Labels

Comments

@tshelburne
Copy link
Owner

tshelburne commented Apr 13, 2018

Conversation below from Slack.

Ashley Davis [12:59 AM]
Hi Tim, some updates on this. I had to make some changes to package.json to account for Windows command line issues, and now the app does build using purely npm. I'm still getting "Unexpected failure - please try again" once I go to the URL, though.

I may just install a linux VM or something and run the project that way.

Tim [2:04 PM]
Have you migrated? If you look at the logging, you might see "missing students table" or something like that

Ashley Davis [9:41 PM]
Hi Tim, it's working....sort of. This was the issue: w3tecch/express-typescript-boilerplate#7 Once I edited package.json to include the fix, it was finally able to migrate properly and create/seed the dev.sqlite3 database.
GitHub
Windows - broken setup/serve scripts · Issue #7 · w3tecch/express-typescript-boilerplate
Some scripts from the package.json do not work correctly on windows machines. for example, when I run npm run setup there is an error when executing knex: C:\path\to\project\node_modules.bin\knex:...
The new issue is that I get "Student ID does not exist". I'm guessing because in the console log, this is showing "GET http://localhost:35729/livereload.js?snipver=1 net::ERR_CONNECTION_REFUSED" and on a refresh, this: polling-xhr.js?9d7b:264 GET http://localhost:3000/socket.io/?studentId=undefined&EIO=3&transport=polling&t=MAyf6Gt net::ERR_CONNECTION_REFUSED

Tim [9:45 PM]
Is the .id file there with your id?

Ashley Davis [9:46 PM]
It is there. Also, here is the dump of the students table:
CREATE TABLE IF NOT EXISTS "students" ("id" integer not null primary key autoincrement, "unique_id" varchar(255) not null, "name" varchar(255) not null, "created_at" datetime not null default CURRENT_TIMESTAMP, "updated_at" datetime not null default CURRENT_TIMESTAMP, "confirmed_at" datetime null);
INSERT INTO students VALUES(1,'71126498','Test Student','2018-04-13 01:02:23','2018-04-13 01:02:23',NULL);

Tim [9:46 PM]
Harrumph

Ashley Davis [11:29 PM]
Hi Tim, the issue is that for some reason src/config.js is not grabbing any of the actual environment variables or perhaps Windows isn't setting them correctly. It isn't an issue for the port, backend, etc because they have alternatives if they're not found, but studentId does not. If I hardcode the studentId value in config.js or set it in the terminal before running start, then it loads correctly. Let me know if you have any ideas how to fix this.

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

No branches or pull requests

1 participant