请问各位老师,react配置webpack文件时,一直暴露不了config文件
P粉810549512
P粉810549512 2022-12-21 20:16:39
[React讨论组]

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

全部回复(0)
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号