【发布时间】:2022-10-06 18:32:26
【问题描述】:
我想在 Heroku 中部署我的 React 应用程序,但我的终端中出现此错误:
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-20 stack
remote: -----> Using buildpack: heroku/nodejs
remote: -----> Node.js app detected
remote:
remote: -----> Creating runtime environment
remote:
remote: NPM_CONFIG_LOGLEVEL=error
remote: NODE_VERBOSE=false
remote: NODE_ENV=production
remote: NODE_MODULES_CACHE=true
remote:
remote: -----> Installing binaries
remote: engines.node (package.json): unspecified
remote: engines.npm (package.json): unspecified (use default)
remote:
remote: Resolving node version 16.x...
remote: Downloading and installing node 16.17.0...
remote: Using default npm version: 8.15.0
remote:
remote: -----> Restoring cache
remote: Cached directories were not restored due to a change in version of node, npm, yarn or stack
remote: Module installation may take longer for this build
remote:
remote: -----> Installing dependencies
remote: Installing node modules
remote: npm ERR! code EUSAGE
remote: npm ERR!
remote: npm ERR! `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
remote: npm ERR!
remote: npm ERR! Invalid: lock file\'s ajv@6.12.6 does not satisfy ajv@8.11.0
remote: npm ERR! Missing: ajv@6.12.6 from lock file
remote: npm ERR! Invalid: lock file\'s @types/react@18.0.17 does not satisfy @types/react@17.0.48
remote: npm ERR! Invalid: lock file\'s json-schema-traverse@0.4.1 does not satisfy json-schema-traverse@1.0.0
remote: npm ERR! Missing: ajv@6.12.6 from lock file
-
你是否读错误?
`npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing. -
你好,我已经输入了这个命令,但仍然有错误:(