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

Issues with npm that seems to be a syntax error for server-side rendering #917

Open
Zacharymk1213 opened this issue Jul 3, 2022 · 6 comments

Comments

@Zacharymk1213
Copy link

Zacharymk1213 commented Jul 3, 2022

After downgrading Python to 3.9.4 among other things I to run npm start and get the following:
> [email protected] start > nodemon static/bundles/server/server-bundle.js

[nodemon] 1.19.4 [nodemon] to restart at any time, enter rs
[nodemon] watching dir(s): *.* [nodemon] watching extensions: js,mjs,json
[nodemon] starting node static/bundles/server/server-bundle.js node/server.js (node:44849) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use node --trace-warnings ...to show where the warning was created)/home/zachary/Sefaria-Project/node/server.js:3
import "core-js/stable"; ^^^^^^

SyntaxError: Cannot use import statement outside a module at Object.compileFunction (node:vm:353:18)
at wrapSafe (node:internal/modules/cjs/loader:1040:15) at Module._compile (node:internal/modules/cjs/loader:1076:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1166:10) at Module.load (node:internal/modules/cjs/loader:988:32)
at Module._load (node:internal/modules/cjs/loader:834:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
` at node:internal/main/run_main_module:17:47

Node.js v18.4.0 [nodemon] app crashed - waiting for file changes before starting...

@Zacharymk1213 Zacharymk1213 changed the title Issues with npm that seems to be a syntax error Issues with npm that seems to be a syntax error for server-side rendering Jul 4, 2022
@edamboritz
Copy link
Contributor

Hi, its not clear to us what the issue is here. It does not appear to be related directly to Sefaria code. Can you provide further details of what commands and installations you ran preceeding this issue so we can try and offer more guided help?

@ahron-maslin
Copy link

@Zacharymk1213 did you have any luck with this? I am running into the same issue

@Zacharymk1213
Copy link
Author

@ahron-maslin nope. I honestly, forget what I did or how I got the error a year and a half ago. Can you write some better documentation of it (I wasn't good at documenting things then.)

@ahron-maslin
Copy link

@Zacharymk1213 all I did was a docker compose up, but I tried a local installation and got the same error

@Zacharymk1213
Copy link
Author

Zacharymk1213 commented Dec 6, 2023 via email

@ahron-maslin
Copy link

ahron-maslin commented Dec 6, 2023

uname -a
Linux amaz 5.15.133.1-microsoft-standard-WSL2 #1 SMP Thu Oct 5 21:02:42 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

lsb_release -a
No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04.3 LTS Release: 22.04 Codename: jammy

docker -v
Docker version 24.0.7, build afdd53b

node -v
v18.12.1

python -V
Python 3.10.12

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