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

Windows Build #2153

Closed
onurozkan opened this issue Oct 12, 2017 · 13 comments · Fixed by ckeditor/ckeditor5-build-classic#27
Closed

Windows Build #2153

onurozkan opened this issue Oct 12, 2017 · 13 comments · Fixed by ckeditor/ckeditor5-build-classic#27
Labels
package:build-classic pending:feedback This issue is blocked by necessary feedback. type:feature This issue reports a feature request (an idea for a new functionality or a missing option).

Comments

@onurozkan
Copy link

Hello,

Currently build scripts does not work on Windows.

Is there any plan for Windows support soon? or any hacks/tricks for now?

Thanks.

@Reinmar
Copy link
Member

Reinmar commented Oct 12, 2017

Hey!

How does it break now? It may be something simple, but we didn't test it on Windows yet so I really don't know.

As for Windows support in general, I guess it's a high time that we provide it for at least the builds. Support for the entire development environment is something bigger and far less developers will need it so it may wait (I hope).

@pomek
Copy link
Member

pomek commented Oct 12, 2017

About half of the year ago I tested our test tools on Windows and one issue which I found was invalid regexp for Windows.

I guess the same problem can occur here. When we made a config file, we assumed that Webpack will be executed on Unix. So regexps have been written for Unix paths.

If we fix the regexp for Windows, most probably the problem won't occur anymore. It's worth checking.

@onurozkan
Copy link
Author

Tried few things.

This is the result of default build as "npm run build"

C:\Users\onur\Desktop\ckeditor5-build-classic-master>npm run build

> @ckeditor/ckeditor5-build-classic@1.0.0-alpha.1 build C:\Users\onur\Desktop\ckeditor5-build-classic-master
> npm run create-entry-file && npm run build-ckeditor


> @ckeditor/ckeditor5-build-classic@1.0.0-alpha.1 create-entry-file C:\Users\onur\Desktop\ckeditor5-build-classic-master
> ./bin/create-entry-file.js

'.' is not recognized as an internal or external command,
operable program or batch file.

npm ERR!     C:\Users\onur\AppData\Roaming\npm-cache\_logs\2017-10-12T10_13_33_333Z-debug.log

Later i changed create entry file script to this; "node bin/create-entry-file.js".

C:\Users\onur\Desktop\ckeditor5-build-classic-master>npm run build

> @ckeditor/ckeditor5-build-classic@1.0.0-alpha.1 build C:\Users\onur\Desktop\ckeditor5-build-classic-master
> npm run create-entry-file && npm run build-ckeditor


> @ckeditor/ckeditor5-build-classic@1.0.0-alpha.1 create-entry-file C:\Users\onur\Desktop\ckeditor5-build-classic-master
> node bin/create-entry-file.js

Creating the entry file...
Done.

> @ckeditor/ckeditor5-build-classic@1.0.0-alpha.1 build-ckeditor C:\Users\onur\Desktop\ckeditor5-build-classic-master
> ./bin/build-ckeditor.sh

'.' is not recognized as an internal or external command,
operable program or batch file.

And eventually i checked shell script, saw webpack, and changed "build-ckeditor" command to "webpack".

This is the the error i got.

C:\Users\onur\Desktop\ckeditor5-build-classic-master>npm run build

> @ckeditor/ckeditor5-build-classic@1.0.0-alpha.1 build C:\Users\onur\Desktop\ckeditor5-build-classic-master
> npm run create-entry-file && npm run build-ckeditor


> @ckeditor/ckeditor5-build-classic@1.0.0-alpha.1 create-entry-file C:\Users\onur\Desktop\ckeditor5-build-classic-master
> node bin/create-entry-file.js

Creating the entry file...
Done.

> @ckeditor/ckeditor5-build-classic@1.0.0-alpha.1 build-ckeditor C:\Users\onur\Desktop\ckeditor5-build-classic-master
> webpack

C:\Users\onur\Desktop\ckeditor5-build-classic-master\node_modules\@ckeditor\ckeditor5-dev-webpack-plugin\lib\replacetcalls.js:29
                                const pathToCoreTranslationPackage = result.match( /.+\/ckeditor5-core/ )[ 0 ];
                                                                                                         ^

TypeError: Cannot read property '0' of null
    at compiler.resolvers.normal.resolve (C:\Users\onur\Desktop\ckeditor5-build-classic-master\node_modules\@ckeditor\ckeditor5-dev-webpack-plugin\lib\replacetcalls.js:29:78)
    at onResolve (C:\Users\onur\Desktop\ckeditor5-build-classic-master\node_modules\enhanced-resolve\lib\Resolver.js:70:11)
    at innerCallback (C:\Users\onur\Desktop\ckeditor5-build-classic-master\node_modules\enhanced-resolve\lib\Resolver.js:143:22)
    at callbackWrapper (C:\Users\onur\Desktop\ckeditor5-build-classic-master\node_modules\enhanced-resolve\lib\createInnerCallback.js:10:21)
    at next (C:\Users\onur\Desktop\ckeditor5-build-classic-master\node_modules\tapable\lib\Tapable.js:249:35)
    at C:\Users\onur\Desktop\ckeditor5-build-classic-master\node_modules\enhanced-resolve\lib\UnsafeCachePlugin.js:39:22
    at callbackWrapper (C:\Users\onur\Desktop\ckeditor5-build-classic-master\node_modules\enhanced-resolve\lib\createInnerCallback.js:10:21)
    at innerCallback (C:\Users\onur\Desktop\ckeditor5-build-classic-master\node_modules\enhanced-resolve\lib\Resolver.js:143:22)
    at callbackWrapper (C:\Users\onur\Desktop\ckeditor5-build-classic-master\node_modules\enhanced-resolve\lib\createInnerCallback.js:10:21)
    at next (C:\Users\onur\Desktop\ckeditor5-build-classic-master\node_modules\tapable\lib\Tapable.js:249:35)
    at innerCallback (C:\Users\onur\Desktop\ckeditor5-build-classic-master\node_modules\enhanced-resolve\lib\Resolver.js:143:22)
    at callbackWrapper (C:\Users\onur\Desktop\ckeditor5-build-classic-master\node_modules\enhanced-resolve\lib\createInnerCallback.js:10:21)
    at next (C:\Users\onur\Desktop\ckeditor5-build-classic-master\node_modules\tapable\lib\Tapable.js:249:35)
    at resolver.doResolve.createInnerCallback (C:\Users\onur\Desktop\ckeditor5-build-classic-master\node_modules\enhanced-resolve\lib\DescriptionFilePlugin.js:41:24)
    at callbackWrapper (C:\Users\onur\Desktop\ckeditor5-build-classic-master\node_modules\enhanced-resolve\lib\createInnerCallback.js:10:21)
    at afterInnerCallback (C:\Users\onur\Desktop\ckeditor5-build-classic-master\node_modules\enhanced-resolve\lib\Resolver.js:165:22)
    at callbackWrapper (C:\Users\onur\Desktop\ckeditor5-build-classic-master\node_modules\enhanced-resolve\lib\createInnerCallback.js:10:21)
    at next (C:\Users\onur\Desktop\ckeditor5-build-classic-master\node_modules\tapable\lib\Tapable.js:249:35)
    at C:\Users\onur\Desktop\ckeditor5-build-classic-master\node_modules\enhanced-resolve\lib\ModuleKindPlugin.js:20:36
    at callbackWrapper (C:\Users\onur\Desktop\ckeditor5-build-classic-master\node_modules\enhanced-resolve\lib\createInnerCallback.js:10:21)
    at innerCallback (C:\Users\onur\Desktop\ckeditor5-build-classic-master\node_modules\enhanced-resolve\lib\Resolver.js:143:22)
    at callbackWrapper (C:\Users\onur\Desktop\ckeditor5-build-classic-master\node_modules\enhanced-resolve\lib\createInnerCallback.js:10:21)
    at next (C:\Users\onur\Desktop\ckeditor5-build-classic-master\node_modules\tapable\lib\Tapable.js:249:35)
    at innerCallback (C:\Users\onur\Desktop\ckeditor5-build-classic-master\node_modules\enhanced-resolve\lib\Resolver.js:143:22)
    at callbackWrapper (C:\Users\onur\Desktop\ckeditor5-build-classic-master\node_modules\enhanced-resolve\lib\createInnerCallback.js:10:21)
    at next (C:\Users\onur\Desktop\ckeditor5-build-classic-master\node_modules\tapable\lib\Tapable.js:249:35)
    at C:\Users\onur\Desktop\ckeditor5-build-classic-master\node_modules\enhanced-resolve\lib\forEachBail.js:29:14
    at callbackWrapper (C:\Users\onur\Desktop\ckeditor5-build-classic-master\node_modules\enhanced-resolve\lib\createInnerCallback.js:10:21)
    at innerCallback (C:\Users\onur\Desktop\ckeditor5-build-classic-master\node_modules\enhanced-resolve\lib\Resolver.js:143:22)
    at callbackWrapper (C:\Users\onur\Desktop\ckeditor5-build-classic-master\node_modules\enhanced-resolve\lib\createInnerCallback.js:10:21)

I think we are now in same page with @pomek

@onurozkan
Copy link
Author

We can easily skip first 2 problems just by changing these lines. But cgywin required for shell script. Tried on Mac and Windows, worked well.

"create-entry-file": "node bin/create-entry-file.js",
"build-ckeditor": "sh bin/build-ckeditor.sh",

So only problem probably regexp.

@pomek
Copy link
Member

pomek commented Oct 12, 2017

const pathToCoreTranslationPackage = result.match( /.+\/ckeditor5-core/ )[ 0 ];
TypeError: Cannot read property '0' of null

Looks like the problem with regexps. It should be an easy-to-solve thing. Instead of \/ you could use \\\\.

@pomek
Copy link
Member

pomek commented Oct 12, 2017

And we could detect whether use Unix / Windows separator path in regexp.

@Reinmar, WDYT?

@onurozkan
Copy link
Author

changed line to this, solved the problem.

const pathToCoreTranslationPackage = result.match( /.+\\ckeditor5-core/ )[ 0 ];

@Reinmar
Copy link
Member

Reinmar commented Oct 12, 2017

@onurozkan, great! Thanks for the details. Could you make a PR to this package with your changes?

We'll handle the regexp in https://github.com/ckeditor/ckeditor5-dev/tree/master/packages/ckeditor5-dev-webpack-plugin and see if something's left. @pomek, could you look into it?

@pomek
Copy link
Member

pomek commented Oct 12, 2017

Yea. \\\\ is ok in case if you create a regexp using the constructor (new RegExp( string )).

@pomek
Copy link
Member

pomek commented Oct 12, 2017

Part of the ticket related to Webpack plugin has been reported here – https://github.com/ckeditor/ckeditor5-dev/issues/297.

@pomek
Copy link
Member

pomek commented Oct 12, 2017

I applied changes from ckeditor/ckeditor5-build-classic#27 to other builds repositories:

@Reinmar
Copy link
Member

Reinmar commented Oct 12, 2017

Thanks for the PR! And thanks @pomek for merging it.

The other issue that we need to solve: https://github.com/ckeditor/ckeditor5-dev/issues/297.

EDIT: Oops, I haven't noticed you linked to it already, @pomek.

@Reinmar
Copy link
Member

Reinmar commented Oct 20, 2017

I've just released @ckeditor/ckeditor5-dev-webpack-plugin@2.0.20 – this version should fix the issue.

@mlewand mlewand transferred this issue from ckeditor/ckeditor5-build-classic Oct 8, 2019
@mlewand mlewand added pending:feedback This issue is blocked by necessary feedback. resolution:solved type:feature This issue reports a feature request (an idea for a new functionality or a missing option). package:build-classic labels Oct 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:build-classic pending:feedback This issue is blocked by necessary feedback. type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants