Skip to content

fix es6 compilation#21371

Closed
wojsmol wants to merge 1 commit intojoomla:4.0-devfrom
wojsmol:fix-admin-login
Closed

fix es6 compilation#21371
wojsmol wants to merge 1 commit intojoomla:4.0-devfrom
wojsmol:fix-admin-login

Conversation

@wojsmol
Copy link
Copy Markdown
Contributor

@wojsmol wojsmol commented Aug 2, 2018

Pull Request for Issue # .

Summary of Changes

This PR reverts build/build-modules-js/compile-es6.js to https://raw.githubusercontent.com/joomla/joomla-cms/0d996e30749bbeee4681b02a5e1be0dd91addb2e/build/build-modules-js/compile-es6.js removing testing changes made in PR #21350

Problem is reproducible at least on Windows.

Testing Instructions

code review
or install 4.0-dev on this commit from github - see docs

after applying this you must run npm run build:js

Expected result

no_admin_erroradministration

Actual result

admin_error

Documentation Changes Required

no

cc @wilsonge @dgrammatiko

@roland-d
Copy link
Copy Markdown
Contributor

roland-d commented Aug 3, 2018

I have tested this item ✅ successfully on 0a7b18c

I was unable to login to the admin screen, after applying the changes and run npm install. After NPM was finished, I saw the login screen.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21371.

@wojsmol
Copy link
Copy Markdown
Contributor Author

wojsmol commented Aug 3, 2018

@roland-d npm run build:js is match master but results are the same 😄

@dgrammatiko
Copy link
Copy Markdown
Contributor

@wojsmol this code is really redundant...

@roland-d
Copy link
Copy Markdown
Contributor

roland-d commented Aug 3, 2018

I don't know, I am told to run npm install and I can't login anymore.....

@dgrammatiko
Copy link
Copy Markdown
Contributor

@roland-d what are the errors in the console.log of your browser?
Were there any errors when running npm install

@roland-d
Copy link
Copy Markdown
Contributor

roland-d commented Aug 3, 2018

@dgrammatiko There are always issues when I run npm install :)

This is on a Windows laptop of one of the students:

npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN babel-loader@6.4.1 requires a peer of webpack@1 || 2 || ^2.1.0-beta || ^2.2.0-rc but none is installed. You must install peer dependencies yourself.
npm WARN sass-loader@5.0.1 requires a peer of webpack@^2.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN com_media@4.0.0 No repository field.

SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents)
SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} {"os":"win32","arch":"x64"} 

On my Mac I get this:

npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN babel-loader@6.4.1 requires a peer of webpack@1 || 2 || ^2.1.0-beta || ^2.2.0-rc but none is installed. You must install peer dependencies yourself.
npm WARN sass-loader@5.0.1 requires a peer of webpack@^2.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN com_media@4.0.0 No repository field.

audited 8385 packages in 67.258s
found 20 vulnerabilities (10 low, 9 moderate, 1 high)

@dgrammatiko
Copy link
Copy Markdown
Contributor

These messages are ok, on the windows os some packages are not avilable (needed) The peer dependencies are coming from the media manager and are also ok.
The thing with this piece of code is:

  • it's wrong (will search and tranpile all the es6.js files in place) wich will ruin our source folders!!!
  • it was ment to be called directly, but we don't want to directly call this module, we have already 2 commands: npm run build:js and node build.js --compile-js
  • The command node build.js --compile-js will also accept a specific source folder so someone theretically can compile only the files teir working on, although we have a watch function fo this

@roland-d
Copy link
Copy Markdown
Contributor

roland-d commented Aug 3, 2018

@dgrammatiko The code may be wrong but if users don't get a login page, we search for solutions :)

@dgrammatiko
Copy link
Copy Markdown
Contributor

dgrammatiko commented Aug 3, 2018

Ok, can you please provide me the js files that the browser is missing without this PR?
npm install here on the login page I have:
screenshot 2018-08-03 at 13 39 55

Also what is the OS you're running ?

@roland-d
Copy link
Copy Markdown
Contributor

roland-d commented Aug 3, 2018

@dgrammatiko I have tried to get the issue again but no matter what I try, I always get the login screen this time.

The OS is Windows 10.0.17134.165.

@dgrammatiko
Copy link
Copy Markdown
Contributor

@wilsonge this PR is wrong please don't merge

@wojsmol wojsmol closed this Aug 3, 2018
@wojsmol
Copy link
Copy Markdown
Contributor Author

wojsmol commented Aug 3, 2018

@dgrammatiko PR closed

@bene-we
Copy link
Copy Markdown
Contributor

bene-we commented Aug 6, 2018

I also cannot login, these are the javascript files that are loaded:

- passwordview.min.js
- validate.min.js
- core.min.js
- keepalive.min.js
- focus-visible.min.js
- joomla-alert.min.js
- punycode.min.js

Should I install this PR and test if it's working afterwards?
@roland-d

@wojsmol
Copy link
Copy Markdown
Contributor Author

wojsmol commented Aug 6, 2018

@ggppdk Competing list from @bene-we with your screenshot missing script is admin-login.min.js.

@ggppdk
Copy link
Copy Markdown
Contributor

ggppdk commented Aug 6, 2018

@wojsmol did you mean to reference me ?
do you ask me to test something ?

@wojsmol
Copy link
Copy Markdown
Contributor Author

wojsmol commented Aug 6, 2018

@ggppdk no sorry 😄
@dgrammatiko See comment from @bene-we.

@dgrammatiko
Copy link
Copy Markdown
Contributor

@wojsmol I need some information here so I can replicate the issue here. So please provide:
OS ver
LAMP (eg xamp or...) version

@wojsmol
Copy link
Copy Markdown
Contributor Author

wojsmol commented Aug 6, 2018

@dgrammatiko In my case:
Windows 8.1
LAMP jamp 3.0.8(trial version downloadable from here - 14 days trial)

@bene-we
Copy link
Copy Markdown
Contributor

bene-we commented Aug 6, 2018

I'm running Windows 10.0.17134 Build 17134 Pro,
xampp version is 3.2.2

The error ocurred in Chrome and Edge

@dgrammatiko
Copy link
Copy Markdown
Contributor

dgrammatiko commented Aug 6, 2018

@wojsmol @bene-we what happens if you run the npm install twice? Do you get all the files for the admin login?

@roland-d
Copy link
Copy Markdown
Contributor

roland-d commented Aug 6, 2018

@dgrammatiko Running npm install for a second time fixes it. Why?

@dgrammatiko
Copy link
Copy Markdown
Contributor

dgrammatiko commented Aug 6, 2018

@roland-d the script is promise based, maybe something is running early and thus not doing what is expected

PS Now debugging an npm cli is going to be fun... fml

@wojsmol
Copy link
Copy Markdown
Contributor Author

wojsmol commented Aug 6, 2018

@dgrammatiko In my case when errors occurred It was reproducible on 2 computers - my and @zwiastunsw.

@roland-d
Copy link
Copy Markdown
Contributor

roland-d commented Aug 6, 2018

So we just have to pray every time we do an update of the git repo that this works?

@mbabker
Copy link
Copy Markdown
Contributor

mbabker commented Aug 6, 2018

So we just have to pray every time we do an update of the git repo that this works?

Or stop using Windoze

/me hobbles for cover

@brianteeman
Copy link
Copy Markdown
Contributor

i had better results running npm in WSL on my Windows 10 box but always one script at a time and NOT all in the one build

@dgrammatiko
Copy link
Copy Markdown
Contributor

Well, I've spotted a couple possible bugs by checking the code. I need to setup a VM and check all these stuff myself. Probably later on (not in a mood to install windows right now)

@bene-we
Copy link
Copy Markdown
Contributor

bene-we commented Aug 6, 2018

Running npm install_ again took nearly 10 minutes, but after that the script is loaded and the login screen works as expected.
I recognized this line in the terminal window:

Compiling: C:\xampp\htdocs\joomla-cms\build\media_src\mod_login\js\admin-login.js

This line also appeared with some other *.js files, and before that there were a huge amount of .js files listed and it said Processing:

@dgrammatiko
Copy link
Copy Markdown
Contributor

@wojsmol @bene-we @ggppdk I think #21427 should fix the windows problem

@wojsmol wojsmol deleted the fix-admin-login branch August 7, 2018 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants