Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in create-wp-react-app create-plugin #26

Open
pmc1388 opened this issue Aug 15, 2020 · 1 comment
Open

Error in create-wp-react-app create-plugin #26

pmc1388 opened this issue Aug 15, 2020 · 1 comment

Comments

@pmc1388
Copy link

pmc1388 commented Aug 15, 2020

Hi i just try to create new plugin in my workspace and was created from template perfectly in plugins directory. But in the terminal show an error and in the wordpress plugin menu not added.

ERROR:

Start initial build process...
yarn run v1.22.4
$ BUILD_PLUGIN=$npm_package_slug yarn --silent parallel-webpack --no-stats --config ../../common/webpack.multi.ts && yarn grunt cachebuster:public && yarn grunt build
You are currently building a plugin, please consider to put your webpack:done actions after the yarn build command for performance reasons!
⨯ Unable to compile TypeScript:
../../common/webpack.factory.ts:339:9 - error TS2322: Type '(WebpackBar | MiniCssExtractPlugin | ForkTsCheckerWebpackPlugin | DefinePlugin)[]' is not assignable to type 'Plugin[]'.
Type 'WebpackBar | MiniCssExtractPlugin | ForkTsCheckerWebpackPlugin | DefinePlugin' is not assignable to type 'Plugin'.
Type 'WebpackBar' is not assignable to type 'Plugin'.
Types of property 'apply' are incompatible.
Type '(compiler: import("/Users/amirhoseinfallahi/Documents/___FCODE/____Projects/WPPlugins/faracode/node_modules/@types/mini-css-extract-plugin/node_modules/@types/webpack/index").Compiler) => void' is not assignable to type '(compiler: import("/Users/amirhoseinfallahi/Documents/___FCODE/____Projects/WPPlugins/faracode/node_modules/@types/webpack/index").Compiler) => void'.
Types of parameters 'compiler' and 'compiler' are incompatible.
Type 'import("/Users/amirhoseinfallahi/Documents/___FCODE/____Projects/WPPlugins/faracode/node_modules/@types/webpack/index").Compiler' is not assignable to type 'import("/Users/amirhoseinfallahi/Documents/___FCODE/____Projects/WPPlugins/faracode/node_modules/@types/mini-css-extract-plugin/node_modules/@types/webpack/index").Compiler'.
The types of 'hooks.shouldEmit.call' are incompatible between these types.
Type '(arg1?: import("/Users/amirhoseinfallahi/Documents/___FCODE/____Projects/WPPlugins/faracode/node_modules/@types/webpack/index").compilation.Compilation, arg2?: any, arg3?: any, ...args: any[]) => any' is not assignable to type '(arg1?: import("/Users/amirhoseinfallahi/Documents/___FCODE/____Projects/WPPlugins/faracode/node_modules/@types/mini-css-extract-plugin/node_modules/@types/webpack/index").compilation.Compilation, arg2?: any, arg3?: any, ...args: any[]) => any'.
Types of parameters 'arg1' and 'arg1' are incompatible.
Type 'import("/Users/amirhoseinfallahi/Documents/___FCODE/____Projects/WPPlugins/faracode/node_modules/@types/mini-css-extract-plugin/node_modules/@types/webpack/index").compilation.Compilation' is not assignable to type 'import("/Users/amirhoseinfallahi/Documents/___FCODE/____Projects/WPPlugins/faracode/node_modules/@types/webpack/index").compilation.Compilation'.

339 plugins: [
~~~~~~~

../../node_modules/@types/webpack/index.d.ts:131:9
131 plugins?: Plugin[];
~~~~~~~
The expected type comes from property 'plugins' which is declared here on type 'Configuration'

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: Command failed with exit code 1: yarn build

@honzavaclavik
Copy link

I have same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants