Sefaria-Project icon indicating copy to clipboard operation
Sefaria-Project copied to clipboard

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

Open Zacharymk1213 opened this issue 3 years ago • 6 comments

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 avatar Jul 03 '22 17:07 Zacharymk1213

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?

edamboritz avatar Jul 04 '22 07:07 edamboritz

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

ahron-maslin avatar Dec 06 '23 08:12 ahron-maslin

@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 avatar Dec 06 '23 14:12 Zacharymk1213

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

ahron-maslin avatar Dec 06 '23 15:12 ahron-maslin

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: @.***>

Zacharymk1213 avatar Dec 06 '23 15:12 Zacharymk1213

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

ahron-maslin avatar Dec 06 '23 17:12 ahron-maslin