Dear teachers, when react configures the webpack file, the config file cannot be exposed.
P粉810549512
P粉810549512 2022-12-21 20:16:39
0
0
983

D:\web前端资料\practice\demo>git init

Initialized empty Git repository in D:/web前端资料/practice/demo/.git/

D:\web前端资料\practice\demo>git add .

warning: in the working copy of '.gitignore', LF will be replaced by CRLF the next time Git touches it

warning: in the working copy of 'README.md', LF will be replaced by CRLF the next time Git touches it

warning: in the working copy of 'package-lock.json', LF will be replaced by CRLF the next time Git touches it

warning: in the working copy of 'package.json', LF will be replaced by CRLF the next time Git touches it

warning: in the working copy of 'public/index.html', LF will be replaced by CRLF the next time Git touches it

warning: in the working copy of 'public/manifest.json', LF will be replaced by CRLF the next time Git touches it

warning: in the working copy of 'public/robots.txt', LF will be replaced by CRLF the next time Git touches it

warning: in the working copy of 'src/App.css', LF will be replaced by CRLF the next time Git touches it

warning: in the working copy of 'src/App.js', LF will be replaced by CRLF the next time Git touches it

warning: in the working copy of 'src/App.test.js', LF will be replaced by CRLF the next time Git touches it

warning: in the working copy of 'src/index.css', LF will be replaced by CRLF the next time Git touches it

warning: in the working copy of 'src/index.js', LF will be replaced by CRLF the next time Git touches it

warning: in the working copy of 'src/reportWebVitals.js', LF will be replaced by CRLF the next time Git touches it

warning: in the working copy of 'src/setupTests.js', LF will be replaced by CRLF the next time Git touches it

D:\web前端资料\practice\demo>git commit -m '暴露配置项'

Author identity unknown

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"

  git config --global user.name "Your Name"

to set your account's default identity.

Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got '27674@LAPTOP-G13GFC12.(none)')

D:\web前端资料\practice\demo>npm run start

npm WARN invalid config registry="" set in C:\Users\27674\.npmrc

npm WARN invalid config Must be full url with "http://"

npm WARN invalid config registry=""

npm WARN invalid config Must be a full url with 'http://'

> demo@0.1.0 start D:\web前端资料\practice\demo

> react-scripts start

(node:58176) [DEP_WEBPACK_DEV_SERVER_ON_AFTER_SETUP_MIDDLEWARE] DeprecationWarning: 'onAfterSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.

(Use `node --trace-deprecation ...` to show where the warning was created)

(node:58176) [DEP_WEBPACK_DEV_SERVER_ON_BEFORE_SETUP_MIDDLEWARE] DeprecationWarning: 'onBeforeSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.

Starting the development server...

Compiled successfully!

You can now view demo in the browser.

  Local:            http://localhost:3000

  On Your Network:  http://10.89.187.222:3000

Note that the development build is not optimized.

To create a production build, use npm run build.

webpack compiled successfully

终止批处理操作吗(Y/N)? y

D:\web前端资料\practice\demo>npm run eject

npm WARN invalid config registry="" set in C:\Users\27674\.npmrc

npm WARN invalid config Must be full url with "http://"

npm WARN invalid config registry=""

npm WARN invalid config Must be a full url with 'http://'

> demo@0.1.0 eject D:\web前端资料\practice\demo

> react-scripts eject

NOTE: Create React App 2 supports TypeScript, Sass, CSS Modules and more without ejecting: https://reactjs.org/blog/2018/10/01/create-react-app-v2.html

√ Are you sure you want to eject? This action is permanent. ... yes

This git repository has untracked files or uncommitted changes:

.gitignore

README.md

package-lock.json

package.json

public/favicon.ico

public/index.html

public/logo192.png

public/logo512.png

public/manifest.json

public/robots.txt

src/App.css

src/App.js

src/App.test.js

src/index.css

src/index.js

src/logo.svg

src/reportWebVitals.js

src/setupTests.js

Remove untracked files, stash or commit any changes, and try again.

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! demo@0.1.0 eject: `react-scripts eject`

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the demo@0.1.0 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\27674\AppData\Roaming\npm-cache\_logs\2022-12-21T12_10_11_909Z-debug.log

标红为执行指令和报错

P粉810549512
P粉810549512

reply all(0)
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!