解决问题记录

2021-07-08  本文已影响0人  麦曦

工作中解决问题记录

peerDependencies

不在webpack打包

ERROR in 5.js?d011da16496c0f7f6327 from UglifyJs

Couldn't find preset "es2015" relative to directory

npm install babel-preset-es2015 --save-dev

nignx配置头

**Webpack **

disableHostCheck: true,

historyApiFallback: true,

imgError( 页面一直报错)

onError=e=>{e.target.onError = null}

https://blog.csdn.net/qq_20282263/article/details/103809219

重新封装Antd Input组件,解决中文输入问题

onCompositionStart

git remote set-url origin https://coding.jd.com/CCMS-PRO/ccms-api-service.git

git push --all https://coding.jd.com/CCMS-PRO/ccms-api-service.git

配置二个重定向

location /testpass {

proxy_pass http://beta-oconsole.jd.com/testpass/example/console_beta;

}

location /api/ {

proxy_pass http://beta-oconsole.jd.com/api/;

}

修改提交信息

git commit --amend

as React.CSSProperties

color_picker: {

backgroundColor: "#fff",

padding: "10px",

position: "absolute",

top: 0,

zIndex: 1000

}

style={style.color_picker}

不能将类型“{ backgroundColor: string; padding: string; position: string; top: number; zIndex: number; }”分配给类型“CSSProperties”。

属性“position”的类型不兼容。

不能将类型“string”分配给类型“Position | undefined”。ts(2322)

解决办法

style={style.color_picker as React.CSSProperties}

不刷新页面,新增URL参数

window.history.pushState({}, "My Profile", location.search + "&id=1")

.fatherrc.ts 配置为 esm: 'rollup',cjs: 'rollup'时报错

https://github.com/umijs/father/issues/125

npm 出现 Error: EPERM: operation not permitted, uv_cwd npm

重启控制台或关闭vscode

npm install模块时 报错:not such file or directory。

npm init -f

-f表示force的意思,不加这个,npm会让你输入一堆信息,比如name、version之类,如果只是做做实验小demo,直接-f,npm帮你初始化package.json,

再重新

Npm install

上一篇下一篇

猜你喜欢

热点阅读