getting error: [semantic-release] › ✖ EPLUGINSCONF The `plugins` configuration is invalid - yaml

I am very new to semantic release so not sure I can exec multiple #semantic-release/exec at a time in a single .releaserc file.
Please let me know if this is feasible, if yes then what is my mistake.
I am getting error:
[7:30:34 AM] [semantic-release] › ℹ Running semantic-release version 17.4.7
2021-09-03T07:30:34.784Z semantic-release:config load config from: /home/runner/work/docker-loki/docker-loki/.releaserc
2021-09-03T07:30:34.793Z semantic-release:config options values: {
branches: [ 'main', { name: 'pre', prerelease: 'beta' } ],
repositoryUrl: 'https://github.com/screencloud/docker-loki',
tagFormat: 'v${version}',
plugins: [
'#semantic-release/commit-analyzer',
'#semantic-release/release-notes-generator',
'#semantic-release/github',
[ [Array] ]
],
_: [],
debug: true,
'$0': '/usr/local/bin/semantic-release'
}
[7:30:34 AM] [semantic-release] › ✖ EPLUGINSCONF The `plugins` configuration is invalid.
The plugins (https://github.com/semantic-release/semantic-release/blob/master/docs/usage/configuration.md#plugins) option must be an array of plugin definions. A plugin definition is an npm module name, optionally wrapped in an array with an object.
The invalid configuration is [ [ '#semantic-release/exec', { prepareCmd1: './scripts/semantic-release/prepareCmd-loki.sh v${nextRelease.version}', publishCmd1: './scripts/semantic-release/publishCmd-loki.sh v${nextRelease.version}' }, '#semantic-release/exec', { prepareCmd2: './scripts/semantic-release/prepareCmd-grafana.sh v${nextRelease.version}', publishCmd2: './scripts/semantic-release/publishCmd-grafana.sh v${nextRelease.version}' } ] ].
AggregateError:
SemanticReleaseError: The `plugins` configuration is invalid.
at module.exports (/usr/local/lib/node_modules/semantic-release/lib/get-error.js:6:10)
at /usr/local/lib/node_modules/semantic-release/lib/plugins/index.js:34:23
at Array.reduce (<anonymous>)
at module.exports (/usr/local/lib/node_modules/semantic-release/lib/plugins/index.js:14:34)
at module.exports (/usr/local/lib/node_modules/semantic-release/lib/get-config.js:84:35)
at async module.exports (/usr/local/lib/node_modules/semantic-release/index.js:257:32)
at async module.exports (/usr/local/lib/node_modules/semantic-release/cli.js:55:5)
at module.exports (/usr/local/lib/node_modules/semantic-release/lib/plugins/index.js:42:11)
at module.exports (/usr/local/lib/node_modules/semantic-release/lib/get-config.js:84:35)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async module.exports (/usr/local/lib/node_modules/semantic-release/index.js:257:32)
at async module.exports (/usr/local/lib/node_modules/semantic-release/cli.js:55:5)
Error: Process completed with exit code 1.
my .releaserc
{
"branches": [
"main",
{
"name": "pre",
"prerelease": "beta"
}
],
"plugins": [
"#semantic-release/commit-analyzer",
"#semantic-release/release-notes-generator",
"#semantic-release/github",
[ [ '#semantic-release/exec',
{
prepareCmd: './scripts/semantic-release/prepareCmd-loki.sh v${nextRelease.version}',
publishCmd: './scripts/semantic-release/publishCmd-loki.sh v${nextRelease.version}'
},
'#semantic-release/exec',
{
prepareCmd1: './scripts/semantic-release/prepareCmd-grafana.sh v${nextRelease.version}',
publishCmd1: './scripts/semantic-release/publishCmd-grafana.sh v${nextRelease.version}'
}
]
]
],
}

Related

ERROR in No configuration provided for /resources/css/app.css

I'm a bit new to webpack and TailwindCSS. The stack we are using here is Laravel with Tailwind and predefined template.
I'm trying to start NPM but get the following error:
ERROR in No configuration provided for
....../resources/css/app.css
My webpack.mix.js has
mix.js('resources/js/main.js', 'public/js')
.postCss('resources/css/app.css', 'public/css', [
require("tailwindcss"),
]);
And webpack.config.js has:
const config = require('./site.config');
const loaders = require('./webpack.loaders');
const plugins = require('./webpack.plugins');
module.exports = {
context: path.join(config.root, config.paths.src),
entry: [
path.join(config.root, config.paths.src, 'js/main.js'),
path.join(config.root, config.paths.src, 'css/style.scss'),
],
output: {
path: path.join(config.root, config.paths.dist),
publicPath: '',
filename: '[name].[hash].js',
},
mode: ['production', 'development'].includes(config.env)
? config.env
: 'development',
devtool: config.env === 'production'
? 'hidden-source-map'
: 'cheap-eval-source-map',
devServer: {
contentBase: path.join(config.root, config.paths.src),
watchContentBase: true,
hot: true,
open: true,
host: config.dev_host,
},
module: {
rules: loaders,
},
stats: 'errors-only',
plugins,
};
There is no where a reference of app.css... What am I doing wrong.

Getting 95% emitting unnamed compat pluginError: UNKNOWN: unknown error, open

Whenever I do npm run watch, the first compilation works fine - but then after few compilations I'll eventually get this error:
95% emitting unnamed compat pluginError: UNKNOWN: unknown error, open 'D:\Laragon\www\erproj\public\js\app.js'
const mix = require('laravel-mix')
require('laravel-vue-lang/mix')
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for the application as well as bundling up all the JS files.
|
*/
mix.js('resources/js/app.js', 'public/js')
mix.webpackConfig(
{
module:
{
rules:
[
{
enforce: 'pre',
exclude: /node_modules/,
loader: 'eslint-loader',
test: /\.(js|vue)?$/
},
]
}
})
mix.webpackConfig(
{
module:
{
rules:
[
{
test: /\.scss$/,
use:
[
{
loader: 'sass-loader'
},
{
loader: 'sass-resources-loader',
options:
{
resources: './resources/sass/_*.scss'
}
}
]
}
]
}
})
mix.webpackConfig(
{
resolve:
{
alias:
{
'#': path.resolve('./resources/js'),
'~': path.resolve('./resources/')
}
}
})
mix.webpackConfig(
{
resolve:
{
alias:
{
'vue$': 'vue/dist/vue.js'
}
}
})
mix.webpackConfig(
{
resolve:
{
alias:
{
'#lang': path.resolve('./resources/lang'),
},
},
module:
{
rules:
[
{
test: /resources[\\/]lang.+\.(php|json)$/,
loader: 'laravel-localization-loader',
},
],
},
})
I've searched back and forth through google and found no solution that would work.
I appreciate any help.
Try manually setting the path where all the assets are going to be compiled. You can do this by adding mix.setPublicPath('public').
Reference: https://laravel-mix.com/docs/6.0/api#setpublicpathpath

vue-sass-loader only compile style tag, not files

I'm using the following rule on my webpack.mix.js file in order to attempt prepending my variable scss file to all my vue components:
{
test: /\.scss$/,
use: [
"vue-style-loader",
"css-loader",
{
loader: "sass-loader",
options: {
data: `#import "#/_var.scss`
}
}
]
}
But when I run npm run watch I get the following error:
ERROR in ./resources/sass/app.scss
Module build failed (from ./node_modules/css-loader/dist/cjs.js):
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
#import "base/normalize";
^
Invalid CSS after "...load the styles": expected 1 selector or at-rule, was "var content = requi"
in /Users/jscotto/app/app.app.com/resources/sass/app.scss (line 1, column 1)
at runLoaders (/Users/jscotto/app/app.app.com/node_modules/webpack/lib/NormalModule.js:316:20)
at /Users/jscotto/app/app.app.com/node_modules/loader-runner/lib/LoaderRunner.js:367:11
at /Users/jscotto/app/app.app.com/node_modules/loader-runner/lib/LoaderRunner.js:233:18
at context.callback (/Users/jscotto/app/app.app.com/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at Object.render [as callback] (/Users/jscotto/app/app.app.com/node_modules/sass-loader/dist/index.js:89:7)
at Object.done [as callback] (/Users/jscotto/app/app.app.com/node_modules/neo-async/async.js:8067:18)
at options.error (/Users/jscotto/app/app.app.com/node_modules/node-sass/lib/index.js:294:32)
# ./resources/sass/app.scss
ERROR in ./resources/sass/app.scss (./node_modules/css-loader/dist/cjs.js??ref--6-2!./node_modules/postcss-loader/src??postcss0!./node_
modules/resolve-url-loader??ref--6-4!./node_modules/sass-loader/dist/cjs.js??ref--6-5!./node_modules/vue-style-loader!./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js??ref--12-2!./resources/sass/app.scss)
Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
#import "base/normalize";
^
Invalid CSS after "...load the styles": expected 1 selector or at-rule, was "var content = requi"
in /Users/jscotto/app/app.app.com/resources/sass/app.scss (line 1, column 1)
# ./resources/sass/app.scss 2:14-397
ERROR in /Users/jscotto/app/app.app.com/resources/js/app.ts
./resources/js/app.ts
My full webpack.mix.js file:
mix.sourceMaps(true, "source-map")
.ts("resources/js/app.ts", "public/js")
.sass("resources/sass/app.scss", "public/css")
.webpackConfig({
module: {
rules: [
{
test: /\.tsx?$/,
loader: "ts-loader",
options: {
appendTsSuffixTo: [/\.vue$/]
},
exclude: /node_modules/
},
{
test: /\.scss$/,
include: [
path.resolve(__dirname, "resources/js/components")
],
use: [
"vue-style-loader",
"css-loader",
{
loader: "sass-loader",
options: {
prependData: "$scotto: #fefefe"
}
}
]
}
]
},
resolve: {
extensions: ["*", ".js", ".jsx", ".vue", ".ts", ".tsx"],
alias: {
"#": path.resolve("resources/sass")
}
}
})
.extract(["vue"])
.version()
.scripts("resources/js/modules/*.js", "public/js/modules.js")
.options({
postCss: [
require("lost"),
require("autoprefixer")({
grid: true
})
]
})
.browserSync({
proxy: process.env.BROWSERSYNC_PROXY,
host: process.env.BROWSERSYNC_HOST,
browser: "google chrome"
});
Updated error as of 12/9/2019
ERROR in ./resources/js/components/clubs/list-clubs.vue?vue&type=style&index=0&id=175555ab&scoped=true&lang=scss& (./node_modules/cs
s-loader!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--8-2!./node_modules/sass-lo
ader/dist/cjs.js??ref--8-3!./node_modules/vue-style-loader!./node_modules/sass-loader/dist/cjs.js??ref--12-2!./node_modules/vue-load
er/lib??vue-loader-options!./resources/js/components/clubs/list-clubs.vue?vue&type=style&index=0&id=175555ab&scoped=true&lang=scss&)
Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
v-bind:key="index"
^
Expected "{".
╷
4 │ var content = require("!!../../../../node_modules/sass-loader/dist/cjs.js??ref--12-2!../../../../node_modules/vue-loader/lib/ind
ex.js??vue-loader-options!./list-clubs.vue?vue&type=style&index=0&id=175555ab&scoped=true&lang=scss&");
│
^
╵
stdin 4:231 root stylesheet
in /Users/jscotto/app/app.app.com/resources/js/components/clubs/list-clubs.vue (line 4, column 231)
# ./resources/js/components/clubs/list-clubs.vue?vue&type=style&index=0&id=175555ab&scoped=true&lang=scss& (./node_modules/style-loader!./node_modules/css-loader!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--8-2!./node_modules/sass-loader/dist/cjs.js??ref--8-3!./node_modules/vue-style-loader!./node_modules/sass-loader/dist/cjs.js??ref--12-2!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/components/clubs/list-clubs.vue?vue&type=style&index=0&id=175555ab&scoped=true&lang=scss&) 2:14-515
# ./resources/js/components/clubs/list-clubs.vue?vue&type=style&index=0&id=175555ab&scoped=true&lang=scss&
# ./resources/js/components/clubs/list-clubs.vue
# ./resources/js sync \.vue$/
# ./resources/js/app.ts
# multi ./resources/js/app.ts ./resources/sass/app.scss
ERROR in /Users/jscotto/app/app.app.com/resources/js/app.ts
Could you try the prependData option?
{
test: /\.scss$/,
use: [
"vue-style-loader",
"css-loader",
{
loader: "sass-loader",
options: {
prependData: '#import "#/_var.scss";',
}
}
]
}

Module build failed when trying to globally import variables on Laravel Vue project

I'm trying to globally import my variables file withing my webpack.mix.js file but have not been able to successfully do it. My alias is confirmed working by importing directly on the component but when I try to use vue-style-loader to include it on every vue style tag, it gives me a large error in my terminal.
ERROR in ./resources/sass/app.scss
Module build failed (from ./node_modules/css-loader/dist/cjs.js):
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
#import "base/normalize";
^
Invalid CSS after "...load the styles": expected 1 selector or at-rule, was "var content = requi"
in /Users/jscotto/app/app.app.com/resources/sass/app.scss (line 1, column 1)
at runLoaders (/Users/jscotto/app/app.app.com/node_modules/webpack/lib/NormalModule.js:316:20)
at /Users/jscotto/app/app.app.com/node_modules/loader-runner/lib/LoaderRunner.js:367:11
at /Users/jscotto/app/app.app.com/node_modules/loader-runner/lib/LoaderRunner.js:233:18
at context.callback (/Users/jscotto/app/app.app.com/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at Object.render [as callback] (/Users/jscotto/app/app.app.com/node_modules/sass-loader/dist/index.js:89:7)
at Object.done [as callback] (/Users/jscotto/app/app.app.com/node_modules/neo-async/async.js:8067:18)
at options.error (/Users/jscotto/app/app.app.com/node_modules/node-sass/lib/index.js:294:32)
# ./resources/sass/app.scss
ERROR in ./resources/sass/app.scss (./node_modules/css-loader/dist/cjs.js??ref--6-2!./node_modules/postcss-loader/src??postcss0!./node_
modules/resolve-url-loader??ref--6-4!./node_modules/sass-loader/dist/cjs.js??ref--6-5!./node_modules/vue-style-loader!./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js??ref--12-2!./resources/sass/app.scss)
Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
#import "base/normalize";
^
Invalid CSS after "...load the styles": expected 1 selector or at-rule, was "var content = requi"
in /Users/jscotto/app/app.app.com/resources/sass/app.scss (line 1, column 1)
# ./resources/sass/app.scss 2:14-397
I believe this could have something to do with the way I'm compiling normal scss files so I will include my entire mix file below:
mix.sourceMaps(true, "source-map")
.ts("resources/js/app.ts", "public/js")
.sass("resources/sass/app.scss", "public/css")
.webpackConfig({
module: {
rules: [
{
test: /\.tsx?$/,
loader: "ts-loader",
options: {
appendTsSuffixTo: [/\.vue$/]
},
exclude: /node_modules/
},
{
test: /\.scss$/,
use: [
"vue-style-loader",
"css-loader",
{
loader: "sass-loader",
options: {
data: `#import "#/_var.scss`
}
}
]
}
]
},
resolve: {
extensions: ["*", ".js", ".jsx", ".vue", ".ts", ".tsx"],
alias: {
"#": path.resolve("resources/sass")
}
}
})
.extract(["vue"])
.version()
.scripts("resources/js/modules/*.js", "public/js/modules.js")
.options({
postCss: [
require("lost"),
require("autoprefixer")({
grid: true
})
]
})
.browserSync({
proxy: process.env.BROWSERSYNC_PROXY,
host: process.env.BROWSERSYNC_HOST,
browser: "google chrome"
});
The rule that is causing the issue is:
{
test: /\.scss$/,
use: [
"vue-style-loader",
"css-loader",
{
loader: "sass-loader",
options: {
data: `#import "#/_var.scss`
}
}
]
}
Just hit the same issue, turned out I was omitting the semicolon in my global definitions.
Try giving this a go:
{
test: /\.scss$/,
use: [
"vue-style-loader",
"css-loader",
{
loader: "sass-loader",
options: {
data: `#import "#/_var.scss;` //<- Semicolon here.
}
}
]
}

Webpack has been initialised using a configuration object that does not match the API schema

enter code herenpm test;
var webpackConfig = require('./webpack.test');
module.exports = function(config) {
config.set({
basePath: '',
frameworks: ['jasmine'],
files: [
{pattern: './karma-shim.js', watched: false}
],
exclude: [
],
preprocessors: {
'./karma-shim.js': ['webpack']
},
webpack: webpackConfig,
plugins:[
'karma-jasmine',
'karma-chrome-launcher',
require("karma-webpack")
],
proxies:{
"/app/": "http://localhost:3000/src/app"
},
reporters: ['progress'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
concurrency: Infinity
})
}
module.exports = {
devtool: 'cheap-module-eval-source-map',
resolve: {
extensions: ['','.ts','.js']
},
module: {
loaders: [
//以.ts结尾的文件使用 TypeScript loader
{test: /.ts$/,loader: 'awesome-typescript-loader'},
{
test:/\.html$/,
loader: 'html'
},
{
test:/\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico)$/,
loader: 'null'
},
{
test:/\.css$/,
loader: 'null'
}
]
}
}
then throws a BUG.
karma start karma.conf.js
keywords if/then/else require v5 option
WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- configuration.entry should be one of these:
object { : string | [string] } | string | [string]
The entry point(s) of the compilation.
- configuration.resolve.extensions[0] should not be empty.
Can not load "webpack"!
First i don't see any entey point mentioned in config file which is required in order to webpack understand where to start from.
Second your resolve option in config file hase mentioned three types to resolve and first one is empty string which webpack don't like so by removing that empty string it should fix that problem
Hope this help you to fix the issue.
I had the same issue and resolved by updating the karma-webpack package to the latest version.

Resources