[RASPBERRY PI 3 B+] Error

when i execute a command in the script i have this error :

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'install', '--unsafe-perm' ]
2 info using npm@6.4.1
3 info using node@v8.15.0
4 verbose npm-session 01e8cf9f1f7137b5
5 silly install runPreinstallTopLevelLifecycles
6 silly preinstall mineos-node@1.1.1
7 info lifecycle mineos-node@1.1.1~preinstall: mineos-node@1.1.1
8 silly install loadCurrentTree
9 silly install readLocalPackageData
10 timing stage:loadCurrentTree Completed in 5533ms
11 silly install loadIdealTree
12 silly install cloneCurrentTreeToIdealTree
13 timing stage:loadIdealTree:cloneCurrentTree Completed in 49ms
14 silly install loadShrinkwrap
15 timing stage:loadIdealTree:loadShrinkwrap Completed in 2989ms
16 silly install loadAllDepsIntoIdealTree
17 timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 2921ms
18 timing stage:loadIdealTree Completed in 7165ms
19 silly currentTree mineos-node@1.1.1
19 silly currentTree ├── abbrev@1.1.1
19 silly currentTree ├── accepts@1.3.3
19 silly currentTree ├── address@1.0.2
19 silly currentTree ├── adm-zip@0.4.11
19 silly currentTree ├── after@0.8.1

posix@4.1.2 install /usr/games/minecraft/node_modules/posix
node-gyp rebuild

Traceback (most recent call last):
File “/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py”, line 13, in
import gyp
File “/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/init.py”, line 8, in
import gyp.input
File “/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py”, line 5, in
from compiler.ast import Const
ImportError: No module named compiler.ast
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.14.79-v7+
gyp ERR! command “/usr/bin/node” “/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “rebuild”
gyp ERR! cwd /usr/games/minecraft/node_modules/posix
gyp ERR! node -v v8.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! posix@4.1.2 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the posix@4.1.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-01-19T19_01_35_688Z-debug.log

What distribution are you using? This error output says that posix is the module npm is having trouble building.

Here’s that error on an Ubuntu system. It could be that your particular distro only installed a python-minimal, so your machine is missing this compiler.ast module. Another too.

See if either of those and their fixes apply to your system. You’ll know when you can build npm install posix (you don’t have to build/rebuild all the modules).

i use dietpi and hi have install python dev and he do not work

gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack     at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:13:12)
gyp ERR! stack     at F (/usr/lib/node_modules/npm/node_modules/which/which.js:68:19)
gyp ERR! stack     at E (/usr/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5
gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Linux 4.14.79-v7+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/games/minecraft/node_modules/posix
gyp ERR! node -v v8.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! posix@4.1.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the posix@4.1.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-01-19T21_41_45_370Z-debug.log

This error suggests that your current system doesn’t have a compiler installed, but that downloading the python dev (or whatever like-named package was a step in the right direction).

You need a compiler. On Debian/Ubuntu based images, you can apt install build-essential. Different distros may use different package systems, but it appears dietpi is Debian-based.

it working great now but i don’t have the commande supervisor wath is the name of the package ?

apt-get install -y git supervisor on Debian.