1
我正在嘗試使用Loopback爲我現有的數據庫創建api。當我嘗試「發現」的模式,我得到這個錯誤:Loopback:無法找到模塊'negotiator'
Message: Cannot find module 'negotiator'
Request: /workspace/api/DataSourceDefinitions/server.tweetvtds/testConnection
Staus: 500
Error: Cannot find module 'negotiator'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (~/lb/node_modules/loopback/node_modules/express/node_modules/accepts/index.js:1:80)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
我讀其他地方,我應該嘗試:
# uninstall the existing version
npm uninstall -g generator-loopback
# install it again
npm install -g generator-loopback
但是這並沒有幫助。這個錯誤是什麼意思,我該如何解決它?