找不到模块 'loadash'

Cannot find module 'loadash'

我在执行命令时收到以下错误:npm start

Cannot find module 'loadash'
    at Function.Module._resolveFilename (module.js:538:15)
    at Function.Module._load (module.js:468:25)
    at Module.require (module.js:587:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (<Path...>/data/dbConnector.js:3:1)
    at Module._compile (module.js:643:30)
    at loader (<Path...>\node_modules\babel-register\lib\node.js:144:5)
    at Object.require.extensions.(anonymous function) [as .js] (<Path...>\node_modules\babel-register\lib\node.js:154:7)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Module.require (module.js:587:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (<Path...>/data/resolvers.js:2:1)
    at Module._compile (module.js:643:30)
    at loader (<Path...>\node_modules\babel-register\lib\node.js:144:5)
    at Object.require.extensions.(anonymous function) [as .js] (<Path...>\node_modules\babel-register\lib\node.js:154:7)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Module.require (module.js:587:17)
    at require (internal/module.js:11:18)
[nodemon] app crashed - waiting for file changes before starting...

package.json 文件:

{
  "name": "essentials",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "nodemon ./index.js --exec babel-node -e js"
  },
  "author": "test",
  "license": "ISC",
  "dependencies": {
    "casual": "^1.5.19",
    "express": "^4.16.3",
    "express-graphql": "^0.6.12",
    "graphql": "^0.13.2",
    "graphql-tools": "^2.23.1",
    "loadash": "^1.0.0",
    "mongoose": "^5.0.12",
    "nodemon": "^1.17.2",
    "sequelize": "^4.37.5",
    "sqlite3": "^4.0.0"
  },
  "devDependencies": {
    "babel-cli": "^6.26.0",
    "babel-preset-env": "^1.6.1",
    "babel-preset-stage-0": "^6.24.1"
  }
}

我点击了以下链接,但其中 none 仍然对我有用。



/36618374

我还看到以下警告消息:

加载引用“https://schemastore.azurewebsites.net/schemas/json/package.json': Unable to load schema from 'https://schemastore.azurewebsites.net/schemas/json/package.json': Unable to connect to https://schemastore.azurewebsites.net/schemas/json/package.json 时出现问题。错误:证书链中的自签名证书

谁能帮我解决这个问题?

包名应该是lodash,而不是loadash

packages.json 中更正后,您需要执行 npm install