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

yarn build --skip-os-packages fails on Windows #28636

Closed
LeeDr opened this issue Jan 12, 2019 · 3 comments
Closed

yarn build --skip-os-packages fails on Windows #28636

LeeDr opened this issue Jan 12, 2019 · 3 comments
Labels
bug Fixes for quality problems that affect the customer experience build

Comments

@LeeDr
Copy link

LeeDr commented Jan 12, 2019

Kibana version: master

Server OS version: Windows 10

Original install method (e.g. download page, yum, from source, etc.): kibana repo

Describe the bug:
yarn build --skip-os-packages fails on Windows as shown below.

Provide logs and/or server output (if relevant):

 info [  kibana  ] Running optimizer
   │ debg Temporarily installing node.js for windows-x64
   │ info Running bin/kibana to trigger the optimizer
   │ debg $ .\bin\kibana.bat --env.name=production --logging.json=false --optimize
   │ debg   log   [00:37:47.446] [info][plugins-service] Plugin initialization disabled.
   │ debg   log   [00:38:14.026] [info][optimize] Optimizing and caching bundles for graph, monitoring, space_selector, login, logout, logged_out, ml, dashboardViewer, apm, gis, canvas, infra, uptime, kibana, status_page, stateSessionStorageRedirect and timelion. This may take a few minutes
   │ debg   log   [00:38:14.254] [info][optimize:dynamic_dll_plugin] Started dynamic dll plugin tasks
   │ debg   log   [00:39:05.182] [info][optimize:dynamic_dll_plugin] Need to compile the client vendors dll
   │ debg   log   [00:39:05.199] [info][optimize:dynamic_dll_plugin] Client vendors dll compilation started
   │ debg   log   [00:40:24.806] [info][optimize:dynamic_dll_plugin] Client vendors dll compilation finished with success
   │ debg   log   [00:41:04.230] [info][optimize:dynamic_dll_plugin] Finished all dynamic dll plugin tasks
   │ debg   log   [00:41:04.232] [info][optimize] Optimization of bundles for graph, monitoring, space_selector, login, logout, logged_out, ml, dashboardViewer, apm, gis, canvas, infra, uptime, kibana, status_page, stateSessionStorageRedirect and timelion complete in 170.21 seconds
   │ debg   log   [00:41:04.233] [info] Plugin initialization disabled.
   │ debg   log   [00:41:04.233] [info][cli] Optimization done.
   │ debg Deleting patterns: [ 'C:\\Users\\LeeDr\\git\\kibana\\build\\kibana\\node' ]
   │ debg Deleted 1 files/directories
   │ succ ✓ 3 min 22 sec

 info [kibana-oss] Running optimizer
   │ debg Temporarily installing node.js for windows-x64
   │ info Running bin/kibana to trigger the optimizer
   │ debg $ .\bin\kibana.bat --env.name=production --logging.json=false --optimize
   │ debg   log   [00:41:10.317] [info][plugins-service] Plugin initialization disabled.
   │ debg   log   [00:41:15.215] [info][optimize] Optimizing and caching bundles for kibana, stateSessionStorageRedirect, status_page and timelion. This may take a few minutes
   │ debg   log   [00:41:15.422] [info][optimize:dynamic_dll_plugin] Started dynamic dll plugin tasks
   │ debg   log   [00:41:39.356] [info][optimize:dynamic_dll_plugin] Need to compile the client vendors dll
   │ debg   log   [00:41:39.376] [info][optimize:dynamic_dll_plugin] Client vendors dll compilation started
   │ debg   log   [00:42:23.207] [info][optimize:dynamic_dll_plugin] Client vendors dll compilation finished with success
   │ debg   log   [00:42:44.062] [info][optimize:dynamic_dll_plugin] Finished all dynamic dll plugin tasks
   │ debg   log   [00:42:44.064] [info][optimize] Optimization of bundles for kibana, stateSessionStorageRedirect, status_page and timelion complete in 88.85 seconds
   │ debg   log   [00:42:44.064] [info] Plugin initialization disabled.
   │ debg   log   [00:42:44.065] [info][cli] Optimization done.
   │ debg Deleting patterns: [ 'C:\\Users\\LeeDr\\git\\kibana\\build\\kibana-oss\\node' ]
   │ debg Deleted 1 files/directories
   │ succ ✓ 1 min 40 sec

 info [  kibana  ] Cleaning client node_modules bundled into the DLL
   │ERROR failure
   │ERROR SyntaxError: Unexpected end of JSON input
   │          at JSON.parse (<anonymous>)
   │          at cleanDllModuleFromEntryPath (C:/Users/LeeDr/git/kibana/src/dev/build/tasks/nodejs_modules/webpack_dll.js:55:26)

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

I think the failure (based on debug logging I had originally inserted in the 6.6 branch) might be caused by this package.json being empty?

$ ls -l /c/Users/LeeDr/git/kibana/build/kibana/node_modules/x-pack/
total 12
drwxr-xr-x 1 LeeDr 197121 0 Jan 11 18:44 common/
drwxr-xr-x 1 LeeDr 197121 0 Jan 11 18:36 node_modules/
-rw-r--r-- 1 LeeDr 197121 0 Jan 11 18:44 package.json  <<<<<<<
drwxr-xr-x 1 LeeDr 197121 0 Jan 11 18:36 plugins/
drwxr-xr-x 1 LeeDr 197121 0 Jan 11 18:36 server/
drwxr-xr-x 1 LeeDr 197121 0 Jan 11 18:44 webpackShims/

This one is not empty;

$ ls -l /c/Users/LeeDr/git/kibana/node_modules/x-pack/
total 84
drwxr-xr-x 1 LeeDr 197121    0 Jan 11 18:31 build/
drwxr-xr-x 1 LeeDr 197121    0 Dec 11 12:47 build_chromium/
drwxr-xr-x 1 LeeDr 197121    0 Dec 11 12:47 common/
-rw-r--r-- 1 LeeDr 197121 6623 Sep 20 12:11 debug.log
drwxr-xr-x 1 LeeDr 197121    0 Dec 11 12:47 dev-tools/
-rw-r--r-- 1 LeeDr 197121 1307 Dec 20 16:46 gulpfile.js
-rw-r--r-- 1 LeeDr 197121 2667 Jan 11 18:22 index.js
drwxr-xr-x 1 LeeDr 197121    0 Jan 11 18:24 node_modules/
-rw-r--r-- 1 LeeDr 197121 8082 Jan 11 18:22 package.json  <<<<<<<<<<
drwxr-xr-x 1 LeeDr 197121    0 Jan 11 18:22 plugins/
-rw-r--r-- 1 LeeDr 197121 5241 Jan 11 18:22 README.md
drwxr-xr-x 1 LeeDr 197121    0 Jan 11 18:22 scripts/
drwxr-xr-x 1 LeeDr 197121    0 Dec 11 12:47 server/
drwxr-xr-x 1 LeeDr 197121    0 Dec 11 12:47 tasks/
drwxr-xr-x 1 LeeDr 197121    0 Jan 11 18:22 test/
drwxr-xr-x 1 LeeDr 197121    0 Jan 11 17:37 test_utils/
-rw-r--r-- 1 LeeDr 197121  629 Dec 20 16:46 tsconfig.json
-rw-r--r-- 1 LeeDr 197121 1304 Dec 11 12:47 tslint.yaml
drwxr-xr-x 1 LeeDr 197121    0 Dec 11 12:47 webpackShims/

Any additional context:
This output was when I had added a debugging console.log in the 6.6 branch;

------------ modulePkgPath = C:\Users\LeeDr\git\kibana\build\kibana\node_modules\x-pack\node_modules\react-vis\package.json ------------------------------------------------------------
------------ modulePkgPath = C:\Users\LeeDr\git\kibana\build\kibana\node_modules\x-pack\node_modules\reduce-reducers\package.json ------------------------------------------------------------
------------ modulePkgPath = C:\Users\LeeDr\git\kibana\build\kibana\node_modules\x-pack\node_modules\rison-node\package.json ------------------------------------------------------------
------------ modulePkgPath = C:\Users\LeeDr\git\kibana\build\kibana\node_modules\x-pack\node_modules\semver\package.json ------------------------------------------------------------
------------ modulePkgPath = C:\Users\LeeDr\git\kibana\build\kibana\node_modules\x-pack\node_modules\ui-select\package.json ------------------------------------------------------------
------------ modulePkgPath = C:\Users\LeeDr\git\kibana\build\kibana\node_modules\x-pack\package.json ------------------------------------------------------------
------------ modulePkgPath = C:\Users\LeeDr\git\kibana\build\kibana\node_modules\x-pack\plugins\infra\package.json ------------------------------------------------------------
------------ modulePkgPath = C:\Users\LeeDr\git\kibana\build\kibana\node_modules\x-pack\package.json ------------------------------------------------------------
   │ERROR failure
   │ERROR SyntaxError: Unexpected end of JSON input
   │          at JSON.parse (<anonymous>)
   │          at cleanDllModuleFromEntryPath (C:/Users/LeeDr/git/kibana/src/dev/build/tasks/nodejs_modules/webpack_dll.js:56:26)

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@LeeDr LeeDr added bug Fixes for quality problems that affect the customer experience build labels Jan 12, 2019
@dforel
Copy link

dforel commented Mar 10, 2020

i meet the same problem like you
are you find some solution of the issue

@LeeDr
Copy link
Author

LeeDr commented Mar 13, 2020

I successfully built Kibana master on my Windows 10 today. There were a couple of setup things I had to deal with.

  • I had Python 3.7.3 in my path, but a re2 package failed to build. Switching to Python 2.7.15 fixed it. It might also work with 3.7.5. But I think the change in this package is being reverted because of these various Python version issues;
    [elastic/kibana] Using re2 for Timelion regular expressions (Using re2 for Timelion regular expressions #55208)

  • I had to run npm install --global --production windows-build-tools with Windows administrator privilege. (I use a git-bash shell and used "Run as administrator" to do this step).

I'm attaching a text file log of my local build with line numbers added. This might be useful for someone to say where their build failed.

kibana-build-numbered.txt

@LeeDr
Copy link
Author

LeeDr commented Mar 13, 2020

Since this is over a year old now. I'll close this. If others are still having issues let's open a new issue with new stack trace.

@LeeDr LeeDr closed this as completed Mar 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience build
Projects
None yet
Development

No branches or pull requests

2 participants