本篇文章给大家谈谈osx–bash错误:找不到/Library/…/setclasspath.sh,但它在那里,以及找不到bash_profile的知识点,同时本文还将给你拓展'':找不到命令-.ba
本篇文章给大家谈谈osx – bash错误:找不到/Library/…/setclasspath.sh,但它在那里,以及找不到bash_profile的知识点,同时本文还将给你拓展' ':找不到命令 - .bashrc / .bash_profile、./components/Avatar.tsx 错误:找不到模块“@babel/preset-stage-0”、Add library ''Maven: org.springframework:spring-beans:4.1.4.RELEASE'' to classpath、Agora On Premise Recording Java和LD_LIBRARY_PATH中的CLASSPATH等相关知识,希望对各位有所帮助,不要忘了收藏本站喔。
本文目录一览:- osx – bash错误:找不到/Library/…/setclasspath.sh,但它在那里(找不到bash_profile)
- ' ':找不到命令 - .bashrc / .bash_profile
- ./components/Avatar.tsx 错误:找不到模块“@babel/preset-stage-0”
- Add library ''Maven: org.springframework:spring-beans:4.1.4.RELEASE'' to classpath
- Agora On Premise Recording Java和LD_LIBRARY_PATH中的CLASSPATH
osx – bash错误:找不到/Library/…/setclasspath.sh,但它在那里(找不到bash_profile)
# Execute the Tomcat startup script ./startup.sh
但是当我输入./startup.sh命令时,我会收到一个错误
Cannot find /Library/Tomcat/Home/bin/setclasspath.sh
但是setclasspath.sh在那里(见下面的屏幕截图):
我究竟做错了什么????
现在我不能cd到家(见下面的截图):
这里是路径信息:
$unset CATALINA_HOME
之后它解决了我的问题.这个命令将取消设置环境变量CATALINA_HOME.
' ':找不到命令 - .bashrc / .bash_profile
我有 Windows,使用 Cygwin,试图通过我的文件JAVA_HOME
永久设置。.bashrc
.bashrc:
export PATH="$JAVA_HOME/bin:$PATH" export JAVA_HOME=$JAVA_HOME:"/cygdrive/c/Program Files (x86)/Java/jdk1.7.0_05"
.bash_profile:
if [ -f ~/.bashrc ]; then source ~/.bashrcfi
运行cygwin:
-bash: $''\377\376if'': command not found-bash: $''then\r'': command not found: No such file or directorysu//.bashrc-bash: /cygdrive/c/Users/jhsu//.bash_profile: line 3: syntax error near unexpected token `fi''-bash: /cygdrive/c/Users/jhsu//.bash_profile: line 3: `fi''
我不确定我是否从适用于另一个系统的教程中获取命令,或者我是否缺少步骤。或者空格导致我的命令无法正常运行。
我已经查看了多个类似的问题,但我没有找到一个问题与我的错误完全一致。
我的家乡路径:
$ echo $HOME/cygdrive/c/Users/jhsu$ echo ~/cygdrive/c/Users/jhsu/
所以我相信文件应该放在正确的位置。
答案1
小编典典当 Cygwin 中所有其他方法都失败时......
尝试dos2unix
对相关文件运行命令。
当您看到如下错误消息时,它可能会有所帮助:
-bash: ''\r'': command not found
Windows 样式的换行符可能会导致 Cygwin 出现问题。
该dos2unix
命令修改换行符,使其与 Unix/Cygwin 兼容。
注意: dos2unix 命令会 就地 修改文件,因此如有必要,请采取预防措施。
如果您需要保留原始文件,您应该先备份它。
Mac 用户注意事项: 该dos2unix
命令在 Mac OS X 上不存在。
查看此答案,了解使用不同工具的各种解决方案。
还有一个unix2dos
相反的命令:
它修改 Unix 换行符,使它们与 Windows 工具兼容。
如果您使用记事本打开一个文件并且所有行一起运行,请尝试unix2dos filename
.
./components/Avatar.tsx 错误:找不到模块“@babel/preset-stage-0”
不知道为什么会出现这个错误
这是我的 webpack,它按预期工作 另外,提前道歉,因为我已经做了大量优化以减少包大小
Webpack.config.base.js
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const webpack = require('webpack');
const CopyPlugin = require("copy-webpack-plugin");
const ServiceWorkerWebpackPlugin = require('serviceworker-webpack-plugin');
const {WebpackManifestPlugin} = require('webpack-manifest-plugin');
const ESLintPlugin = require('eslint-webpack-plugin');
const PurifyCssPlugin = require('purifycss-webpack');
const glob = require("glob");
module.exports = {
target: 'web',stats: 'verbose',output: {
path: __dirname + '/dist',filename: '[name].[hash].bundle.js'
},resolve: {
extensions: ['.js','.jsx']
},module: {
rules: [
{
test: /\.(js|jsx)$/,exclude: /node_modules/,use: {
loader: "babel-loader"
}
},{
test: /\.html$/,use: [
{
loader: "html-loader"
}
]
},{
test: /\.css$/,use: [{
loader: MiniCssExtractPlugin.loader,options: {
publicPath: './'
}
},'css-loader']
},{
test: /\.scss$/,'css-loader','sass-loader']
},{
test: /\.(png|svg|jpg|gif)$/,use: [
'file-loader',{
loader: 'image-webpack-loader',options: {
bypassOnDebug: true,// webpack@1.x
disable: true,// webpack@2.x and newer
mozjpeg: {
progressive: true,},optipng: {
enabled: false,pngquant: {
quality: [0.65,0.90],speed: 4
},gifsicle: {
interlaced: false,}
]
}
]
},plugins: [
new CopyPlugin({
patterns: [
{from: "icons",to: "icons"},{from: "./manifest.webmanifest",to: ""},{from: "./.htaccess",{from: "./robots.txt",to: ""}
],}),new MiniCssExtractPlugin({
filename: "[name].[hash].css"
}),new HtmlWebpackPlugin({
template: "./src/app/index.html",favicon: "./src/assets/image/favicon.png",inject: true,minify: {
removeComments: true,collapseWhitespace: true
}
}),new ServiceWorkerWebpackPlugin({
entry: path.join(__dirname,'./src/app/serviceWorker/serviceWorkerInit.js'),new WebpackManifestPlugin({
fileName: 'asset-manifest.json',// Not to confuse with manifest.json
}),new ESLintPlugin({files: './src/app/app.js'}),new PurifyCssPlugin({
paths: [
...(glob.sync(`./src/app/*.html`)),...(glob.sync(`./src/app/**/*.jsx`)),...(glob.sync(`./dist/*.html`))
],styleExtensions: ['.css','.scss'],moduleExtensions: [".html"],verbose: true,purifyOptions: {
info: true,minify: true,whitelist: ["*purify*"]
},})
]
};
Webpack.config.prod.js
const merge = require('webpack-merge');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const CompressionPlugin = require('compression-webpack-plugin');
const webpackBaseConfiguration = require('./webpack.config.base.js');
const TerserPlugin = require('terser-webpack-plugin')
const webpack = require('webpack');
const GLOBALS = {
'process.env.NODE_ENV': JSON.stringify('production'),__DEV__: false
};
module.exports = merge(webpackBaseConfiguration,{
mode: 'production',entry: [
'@babel/polyfill','./src/app/app.jsx'
],devServer: {
contentBase: './dist'
},optimization: {
splitChunks: {
chunks: 'all',minSize: 20000,maxSize: 0,minChunks: 2,maxAsyncRequests: 30,maxInitialRequests: 30,enforceSizeThreshold: 50000,cacheGroups: {
defaultVendors: {
test: /[\\/]node_modules[\\/]/,priority: -10,reuseExistingChunk: true
},default: {
minChunks: 2,priority: -20,reuseExistingChunk: true
}
}
},usedExports: true,minimizer: [
new TerserPlugin({
parallel: true,terserOptions: {
ecma: 6,new OptimizeCSSAssetsPlugin()
]
},plugins: [
new webpack.DefinePlugin(GLOBALS),new CompressionPlugin({
algorithm: 'gzip',minRatio: Number.MAX_SAFE_INTEGER
}),new CompressionPlugin({
filename: "[path].br",algorithm: "brotliCompress",test: /\.(js|css|html|svg|png|svg|jpg|gif)$/,deleteOriginalAssets: false,minRatio: Number.MAX_SAFE_INTEGER
})
]
});
Webpack.config.dev.js
const merge = require('webpack-merge');
const webpackBaseConfiguration = require('./webpack.config.base');
const webpack = require('webpack');
module.exports = merge(webpackBaseConfiguration,{
mode: 'development',output: {
publicPath: '/'
},devServer: {
contentBase: './src',historyApiFallback: true
},devtool: 'cheap-module-eval-source-map','webpack-hot-middleware/client?reload=true',plugins: [
/*For hot deployment*/
new webpack.HotModuleReplacementPlugin()
]
});
package.json
{
"name": "Sample","version": "1.0.0","description": "React app","scripts": {
"clean": "rimraf dist","deploy": "node deploy","build:prod:deploy": "npm run clean && webpack --mode production --config webpack.config.prod.js && node deploy","build:prod": "npm run clean && webpack --mode production --config webpack.config.prod.js","build:dev": "webpack-dev-server --mode development --config webpack.config.dev.js --open --hot","start": "npm run build && npm run deploy","build": "npm run clean && webpack --mode production --config webpack.config.prod.js && npm run deploy"
},"engines": {
"node": "14.x","npm": "6.x"
},"keywords": [],"author": "","license": "ISC","devDependencies": {
"@babel/cli": "^7.12.1","@babel/core": "^7.2.2","@babel/node": "^7.2.2","@babel/plugin-proposal-class-properties": "^7.3.0","@babel/polyfill": "^7.2.5","@babel/preset-env": "^7.2.0","@babel/preset-react": "^7.0.0","@babel/register": "^7.0.0","@gfx/zopfli": "^1.0.15","babel-eslint": "^10.1.0","babel-loader": "^8.0.4","brotli-webpack-plugin": "^1.1.0","compression-webpack-plugin": "^2.0.0","copy-webpack-plugin": "6.2.1","css-loader": "^2.1.0","eslint": "^7.18.0","eslint-webpack-plugin": "^2.4.1","file-loader": "^3.0.1","ftp-deploy": "^2.4.0","glob": "^7.1.6","html-loader": "^0.5.5","html-webpack-plugin": "^3.2.0","image-minimizer-webpack-plugin": "^1.0.0","image-webpack-loader": "^7.0.1","imagemin-gifsicle": "^7.0.0","imagemin-jpegtran": "^7.0.0","imagemin-optipng": "^8.0.0","imagemin-svgo": "^8.0.0","mini-css-extract-plugin": "^0.5.0","node-sass": "^4.14.1","optimize-css-assets-webpack-plugin": "^5.0.1","purify-css": "^1.2.5","purifycss-webpack": "^0.7.0","rimraf": "^2.6.3","sass-loader": "^7.1.0","serviceworker-webpack-plugin": "^1.0.1","terser-webpack-plugin": "4.2.3","uglifyjs-webpack-plugin": "^2.1.1","webpack": "^4.40.0","webpack-cli": "^3.1.2","webpack-dev-middleware": "^3.5.2","webpack-dev-server": "^3.11.0","webpack-ftp-upload-plugin": "^1.0.3","webpack-hot-middleware": "^2.24.3","webpack-manifest-plugin": "^3.0.0","webpack-merge": "^4.2.1","workbox-cacheable-response": "^6.0.2","workbox-expiration": "^6.0.2","workbox-routing": "^6.0.2","workbox-strategies": "^6.0.2","workbox-webpack-plugin": "^6.0.2","zlib": "^1.0.5"
},"dependencies": {
"axios": "^0.19.0","bootstrap": "^4.5.0","react": "^16.8.1","react-dom": "^16.8.1","react-lazy-load-image-component": "^1.5.1","react-paginate": "^6.5.0","react-redux": "^7.2.2","react-router": "^4.3.1","react-router-dom": "^4.3.1","redux": "^4.0.5","redux-immutable-state-invariant": "^2.1.0","redux-thunk": "^2.3.0"
}
}
Add library ''Maven: org.springframework:spring-beans:4.1.4.RELEASE'' to classpath
导入一个项目之后,创建一个新的 module,然后加了包,结果用注解的时候没有提示,而且要 alt+enter 提示- Add library ''Maven: org.springframework:spring-beans:4.1.4.RELEASE'' to classpath
Agora On Premise Recording Java和LD_LIBRARY_PATH中的CLASSPATH
如何解决Agora On Premise Recording Java和LD_LIBRARY_PATH中的CLASSPATH?
我试图集成SDK以使用本地记录功能,并陷入Java的Set CLAsspATH和Linux的LD_LIBRARY_PATH的困境。
请向我建议如何进行此步骤。 我在Ubuntu 20.04服务器上,并且JAVA / GCC版本如以下屏幕截图所示。
JAVA/GC
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)
今天关于osx – bash错误:找不到/Library/…/setclasspath.sh,但它在那里和找不到bash_profile的介绍到此结束,谢谢您的阅读,有关' ':找不到命令 - .bashrc / .bash_profile、./components/Avatar.tsx 错误:找不到模块“@babel/preset-stage-0”、Add library ''Maven: org.springframework:spring-beans:4.1.4.RELEASE'' to classpath、Agora On Premise Recording Java和LD_LIBRARY_PATH中的CLASSPATH等更多相关知识的信息可以在本站进行查询。
本文标签: