服务器安装strong-pm踩坑
-
1、服务器安装npm+node
2、安装strong-pmnpm install -g strong-pm && sl-pm-install报错1:
user "root" does not have permission to access the dev dir "*/.node-gyp/0.10.37"解决方案:
sudo apt-get install node-gyp报错2:
current user ("nobody") does not have permission to access the dev dir解决方案:
npm已经给出了解决方案,把npm user的权限设为root即可:npm -g config set user root报错3:
appmetrics@3.1.3 install: `node extract_all_binaries.js || node-gyp rebuild` Failed at the appmetrics@3.1.3 install script.解决方案:
降低pm版本npm install -g strong-pm@5 && sl-pm-install安装完成后(启动pm):
slc pm &其他问题:
npm -v internal/modules/cjs/loader.js:818 throw err; ^ Error: Cannot find module 'through'从其他服务器拷贝对应包
scp /usr/local/lib/node_modules/npm/node_modules/* root@*.*.*.*://usr/local/lib/node_modules/npm/node_modules/ scp /usr/lib/node_modules/npm/node_modules/* root@*.*.*.*://usr/lib/node_modules/npm/node_modules/启动报错:
loopback-connector-sqlite3 must be installed to use the sql backend. Use the --json-file-db option if you are unable to install loopback-connector-sqlite3. Error encountered while trying to upgrade: [ Cannot find module '/usr/lib/node_modules/loopback-connector-sqlite3/node_modules/sqlite3/lib/binding/node-v57-linux-x64/node_sqlite3.node' ]使用提示语:
--json-file-db sudo slpm --json-file-db &查看是否成功
netstat -tunlp | grep 8701 tcp6 0 0 :::8701 :::* LISTEN -