Issues with npm that seems to be a syntax error for server-side rendering
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...
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?
@Zacharymk1213 did you have any luck with this? I am running into the same issue
@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.)
@Zacharymk1213 all I did was a docker compose up, but I tried a local installation and got the same error
What system are you using?
On Wed, Dec 6, 2023, 10:27 AM Aharon Maslin @.***> wrote:
@Zacharymk1213 https://github.com/Zacharymk1213 all I did was a docker compose up, but I tried a local installation and got the same error
— Reply to this email directly, view it on GitHub https://github.com/Sefaria/Sefaria-Project/issues/917#issuecomment-1843111876, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUNYVGPAUUGHVURVY3IR5T3YICFFBAVCNFSM52RA2QS2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBUGMYTCMJYG43A . You are receiving this because you were mentioned.Message ID: @.***>
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