Problem installing exampels

Hi,
I am trying to install examples on pyscript/pyscriptjs at main · pyscript/pyscript · GitHub

i followed all the steps.
The last comman ```
npm run dev

gave error 

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'dev' ]
2 info using npm@5.6.0
3 info using node@v9.9.0
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle pyscript@0.0.1~predev: pyscript@0.0.1
6 info lifecycle pyscript@0.0.1~dev: pyscript@0.0.1
7 verbose lifecycle pyscript@0.0.1~dev: unsafe-perm in lifecycle true
8 verbose lifecycle pyscript@0.0.1~dev: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/alaabarazi/Desktop/pyscript-main/pyscriptjs/node_modules/.bin:/Users/alaabarazi/opt/anaconda3/bin:/Users/alaabarazi/opt/anaconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin
9 verbose lifecycle pyscript@0.0.1~dev: CWD: /Users/alaabarazi/Desktop/pyscript-main/pyscriptjs
10 silly lifecycle pyscript@0.0.1~dev: Args: [ '-c', 'rollup -c -w' ]
11 silly lifecycle pyscript@0.0.1~dev: Returned: code: 1  signal: null
12 info lifecycle pyscript@0.0.1~dev: Failed to exec dev script
13 verbose stack Error: pyscript@0.0.1 dev: `rollup -c -w`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
13 verbose stack     at EventEmitter.emit (events.js:180:13)
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:180:13)
13 verbose stack     at maybeClose (internal/child_process.js:936:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
14 verbose pkgid pyscript@0.0.1
15 verbose cwd /Users/alaabarazi/Desktop/pyscript-main/pyscriptjs/examples
16 verbose Darwin 21.4.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "dev"
18 verbose node v9.9.0
19 verbose npm  v5.6.0
20 error code ELIFECYCLE
21 error errno 1
22 error pyscript@0.0.1 dev: `rollup -c -w`
22 error Exit status 1
23 error Failed at the pyscript@0.0.1 dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

I could be wrong but it looks like you may be on too early a version of node. On line 18 of your error text it says:
node v9.9.0

You probably weren’t to know since the instructions you’re using don’t spell out the version required but if you see the instructions here:

… they do specifically say to use node >= 16

I use nvm to handle node so i just installed the LTS version using that (which gave me v16.15 which worked perfectly) but you can probably get it via your computer’s package manager (or install direct from source: Download | Node.js ) and then if you try again i think you’ll most likely be okay.

Thank you! It is working now

1 Like