React use create-react-app to create a project, run npm run eject the establishment of gray error

    I set up a test environment and formal environments running npm run eject time error

  

   The problem here is scaffolding add .gitgnore file, but no local repository, you can normally use the following order

git add .

git commit -m "init"

npm run eject

  After executing the above command completion, the project will be more of a config folder and script folders

  

  Construction of a formal environment build.js script folder inside the

  Copy build.js named grey.js, this is a test environment, and the overall process target node process.env.NODE_ENV = 'production' modify process.env.NODE_ENV = 'development'

  Configuration package file command in package.json

  

  The last general use is axios, so the address configuration generally written on it

  baseURL: process.env.NODE_ENV === 'official address' 'production':? 'test address'

  Packaged command:

    Official Address: npm run build

    Test Address: npm run grey

Guess you like

Origin www.cnblogs.com/muzimumu/p/11934672.html