尝试用节点安装 graphql 包

Trying to install graphql package with node

npm ERR! code ENOSELF
npm ERR! Refusing to install package with name "graphql" under a package
npm ERR! also called "graphql". Did you name your project the same
npm ERR! as the dependency you're installing?
npm ERR! 
npm ERR! For more information, see:

package.json 上的 name 道具更改为除 graphql

之外的任何内容

编辑package.json

{
      "name": "graphql-basic", # --> change name but don't graphql
      "version": "1.0.0",
      "description": "",
      "main": "index.js",
      "scripts": {
          "test": "echo \"Error: no test specified\" && exit 1"
      },
      "author": "",
      "license": "ISC",
      "dependencies": {
          "express": "^4.17.1",
          "express-graphql": "^0.12.0",
          "graphql": "^15.4.0"
      }
}