npm run eject 报错

兴奋的创建项目,执行npm run eject,
问是否需要eject,输入y,点击回车
然后。。。恭喜你
报错
WTF?

? Are you sure you want to eject? This action is permanent. Yes
This git repository has untracked files or uncommitted changes:

react-study/playlist_router/package-lock.json
M react-study/playlist_router/package.json
M react-study/playlist_router/src/home.js
M react-study/playlist_router/src/index.js
kaikeba_full/vue-ts/
react-study/playlist_router/src/item.js
react-study/playlist_router/src/main.js
react-study/react_01/

Remove untracked files, stash or commit any changes, and try again.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] eject: `react-scripts eject`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] eject script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2019-07-25T09_40_15_464Z-debug.log

提示中说:This git repository has untracked files or uncommitted changes,没有git提交,提交了Git。
然后再次运行npm run eject
成功了!!!

Ejecting...

Copying files into D:\study\react-study\react_01
  Adding \config\env.js to the project
  Adding \config\modules.js to the project
  Adding \config\paths.js to the project
  Adding \config\pnpTs.js to the project
  Adding \config\webpack.config.js to the project
  Adding \config\webpackDevServer.config.js to the project
  Adding \config\jest\cssTransform.js to the project
  Adding \config\jest\fileTransform.js to the project
  Adding \scripts\build.js to the project
  Adding \scripts\start.js to the project
  Adding \scripts\test.js to the project

Updating the dependencies
  Removing react-scripts from dependencies
  Adding @babel/core to dependencies
  Adding @svgr/webpack to dependencies
  Adding @typescript-eslint/eslint-plugin to dependencies
  Adding @typescript-eslint/parser to dependencies
  Adding babel-eslint to dependencies
  Adding babel-jest to dependencies
  Adding babel-loader to dependencies
  Adding babel-plugin-named-asset-import to dependencies
  Adding babel-preset-react-app to dependencies
  Adding camelcase to dependencies
  Adding case-sensitive-paths-webpack-plugin to dependencies
  Adding css-loader to dependencies
  Adding dotenv to dependencies
  Adding dotenv-expand to dependencies
  Adding eslint to dependencies
  Adding eslint-config-react-app to dependencies
  Adding eslint-loader to dependencies
  Adding eslint-plugin-flowtype to dependencies
  Adding eslint-plugin-import to dependencies
  Adding eslint-plugin-jsx-a11y to dependencies
  Adding eslint-plugin-react to dependencies
  Adding eslint-plugin-react-hooks to dependencies
  Adding file-loader to dependencies
  Adding fs-extra to dependencies
  Adding html-webpack-plugin to dependencies
  Adding identity-obj-proxy to dependencies
  Adding is-wsl to dependencies
  Adding jest to dependencies
  Adding jest-environment-jsdom-fourteen to dependencies
  Adding jest-resolve to dependencies
  Adding jest-watch-typeahead to dependencies
  Adding mini-css-extract-plugin to dependencies
  Adding optimize-css-assets-webpack-plugin to dependencies
  Adding pnp-webpack-plugin to dependencies
  Adding postcss-flexbugs-fixes to dependencies
  Adding postcss-loader to dependencies
  Adding postcss-normalize to dependencies
  Adding postcss-preset-env to dependencies
  Adding postcss-safe-parser to dependencies
  Adding react-app-polyfill to dependencies
  Adding react-dev-utils to dependencies
  Adding resolve to dependencies
  Adding sass-loader to dependencies
  Adding semver to dependencies
  Adding style-loader to dependencies
  Adding terser-webpack-plugin to dependencies
  Adding ts-pnp to dependencies
  Adding url-loader to dependencies
  Adding webpack to dependencies
  Adding webpack-dev-server to dependencies
  Adding webpack-manifest-plugin to dependencies
  Adding workbox-webpack-plugin to dependencies

Updating the scripts
  Replacing "react-scripts start" with "node scripts/start.js"
  Replacing "react-scripts build" with "node scripts/build.js"
  Replacing "react-scripts test" with "node scripts/test.js"

Configuring package.json
  Adding Jest configuration
  Adding Babel preset
  Adding ESLint configuration

Running npm install...
audited 902125 packages in 39.513s
found 0 vulnerabilities

Ejected successfully!

warning: LF will be replaced by CRLF in react-study/react_01/config/env.js.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in react-study/react_01/config/jest/cssTransform.js.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in react-study/react_01/config/jest/fileTransform.js.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in react-study/react_01/config/modules.js.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in react-study/react_01/config/paths.js.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in react-study/react_01/config/pnpTs.js.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in react-study/react_01/config/webpack.config.js.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in react-study/react_01/config/webpackDevServer.config.js.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in react-study/react_01/scripts/build.js.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in react-study/react_01/scripts/start.js.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in react-study/react_01/scripts/test.js.
The file will have its original line endings in your working directory
Staged ejected files for commit.

Please consider sharing why you ejected in this survey:
  http://goo.gl/forms/Bi6CZjk1EqsdelXk1

你可能感兴趣的:(npm run eject 报错)