Our state of the art Gantt chart


Post by AjithThomas »

After downloading the trial version . I am getting error when trying npm i.

error node-sass@4.12.0 postinstall:'node scripts/build.js'

i am using node version 8 on my windows machine.

These are the steps done .

1)Download the bryntum-gantt-trial and extract

2)It was not clear from the documentation ,which all places we need to do npm I and npm build
so from this forum topic (viewtopic.php?f=44&t=10214) we found that
First you need to navigate to examples/react/_shared and run npm install && npm run build. Then you navigate to examples/react/javascript/basic and run same npm i && npm run build.
The build command inside shared was failing ,so we updated the build script based on this forum answer (viewtopic.php?f=44&t=11906&p=63189&hilit=NODE_ENV#p63189)
and build was succesfull ,

but npm i from javascript/basic is giving the error node-sass@4.12.0 postinstall:'node scripts/build.js'

Any link to documentation on folder locations which require npm i ,would be really helpfull.

Also would like to know what are the steps required to include this as a component to our react application created using create react app.
since the example project seems to have multiple dependencies ,
we would like to know steps on how to install bryntum-gantt and bryntum-react-shared as a package dependency and import it to our application.

Post by sergey.maltsev »

Hi!

Thank you for the report.
Each demo has Readme.md file which should provide all necessary information.
We performed all tests in linux environment and this instructions work fine.
Unfortunately these demos are quite new and were not carefully tested in Windows.

I've reviewed these installation packages and adopted them to be compatible with Windsows.

Please get the attached react.zip package and replace the existing package.json files inside examples/react/ folder with the ones from this zip. Zip has the same folder structure so you could just copy it over existing.

To build basic demo
Run in \examples\react\_shared\
npm install
npm run build
Run in \examples\react\javascript\basic\
npm install
npm run build (or) npm run start
I've created ticket to check all build scripts to be crossplatform
https://app.assembla.com/spaces/bryntum/tickets/9335-crossplatform-framework-demos-build-scripts/details
Attachments
react.zip
(3.21 KiB) Downloaded 172 times

Post by AjithThomas »

Hi Sergey,

Thank you for the reply.

The attached zip file helped in resolving error on first npm build inside _shared folder.

But npm i inside react/javascript/basic is still giving me error .

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.12.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.12.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ae11207\AppData\Roaming\npm-cache\_logs\2019-10-04T16_01_3
8_581Z-debug.log

ae11207@W01BBC28 /c/UBS/Dev/BryntumGantt/gantt-1.1.5-trial/examples/react/javasc
ript/basic

Post by sergey.maltsev »

Hi!

Unfortunately I was unable to reproduce this error.
I used clean Win 10 installation and NodeJS 8 or 10 (both work).

I can suggest you to do one or all of this
- delete package-lock.json and node_modules;
- clean npm cache;
- completely remove all installed global npm packages;
- reinstall node JS or upgrade it to latest stable version;
and install / build again.

Please let me know if you succeeded or not.

This is what I see
npm.gif
npm.gif (1 MiB) Viewed 2861 times

Post by AjithThomas »

Hi Sergey,

Still getting error with node-sass even after removing node modules using rimraf and cleaning node cache.

npm ERR! node-sass@4.12.0 postinstall: `node scripts/build.
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.12.0 postinstall script.

node version : 8.11.3
windows 7

Post by sergey.maltsev »

Hi!

We are trying here to find out the reason for the problems you have.
Need this additional info.
1. What is the Windows version x86 or x64?
2. Did you try to uninstall and reinstall NodeJS and / or upgrade it?

I've removed everything except fixed react demos from this zip.
Please try this code to compile.
https://dev.bryntum.com/examples/gantt-1.1.5-trial-react-fixed.zip

I've checked this in Windows 7/10 x64 with NodeJS 8 and 10.
Build works for me.

Post by sergey.maltsev »

Hi!

Please run
npm install -verbose
And after you receive an eror attach here *-debug.log which is shown in console.

Something like you had before
npm ERR! C:\Users\ae11207\AppData\Roaming\npm-cache\_logs\2019-10-04T16_01_3
8_581Z-debug.log

Few tips on common npm erros can be found here
https://docs.npmjs.com/common-errors

Post by AjithThomas »

Hi sergey,

I have attached the debug.log file.
Windows version is x64.
i installed node version 8.11.3

My observations on this error are

As mentioned in this stack overflow answer [ https://stackoverflow.com/questions/45801457/node-js-python-not-found-exception-due-to-node-sass-and-node-gyp ] seems like node-sass installation results in installation of platform dependencies of node-gyp .(python etc)
npm install --global windows-build-tools seems to be an option from the above link, but it is difficult to get Powershell with admin rights for installation inside company

Please find below the corresponding log error

> node-sass@4.12.0 postinstall c:\UBS\Dev\Bryntam\gantt-1.1.5-trial-fixed\examples\react\javascript\basic\node_modules\node-sass
> node scripts/build.js

Building: c:\ubs\dev\tools\nodejs\v8.11.3\node.exe c:\UBS\Dev\Bryntam\gantt-1.1.5-trial-fixed\examples\react\javascript\basic\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ 'c:\\ubs\\dev\\tools\\nodejs\\v8.11.3\\node.exe',
gyp verb cli 'c:\\UBS\\Dev\\Bryntam\\gantt-1.1.5-trial-fixed\\examples\\react\\javascript\\basic\\node_modules\\node-gyp\\bin\\node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library=' ]
gyp info using node-gyp@3.8.0
gyp info using node@8.11.3 | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed at getNotFoundError (c:\UBS\Dev\Bryntam\gantt-1.1.5-trial-fixed\examples\react\javascript\basic\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (c:\UBS\Dev\Bryntam\gantt-1.1.5-trial-fixed\examples\react\javascript\basic\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (c:\UBS\Dev\Bryntam\gantt-1.1.5-trial-fixed\examples\react\javascript\basic\node_modules\which\which.js:80:29)
gyp verb `which` failed at c:\UBS\Dev\Bryntam\gantt-1.1.5-trial-fixed\examples\react\javascript\basic\node_modules\which\which.js:89:16
gyp verb `which` failed at c:\UBS\Dev\Bryntam\gantt-1.1.5-trial-fixed\examples\react\javascript\basic\node_modules\isexe\index.js:42:5
gyp verb `which` failed at c:\UBS\Dev\Bryntam\gantt-1.1.5-trial-fixed\examples\react\javascript\basic\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed python2 { Error: not found: python2
gyp verb `which` failed at getNotFoundError (c:\UBS\Dev\Bryntam\gantt-1.1.5-trial-fixed\examples\react\javascript\basic\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (c:\UBS\Dev\Bryntam\gantt-1.1.5-trial-fixed\examples\react\javascript\basic\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (c:\UBS\Dev\Bryntam\gantt-1.1.5-trial-fixed\examples\react\javascript\basic\node_modules\which\which.js:80:29)
gyp verb `which` failed at c:\UBS\Dev\Bryntam\gantt-1.1.5-trial-fixed\examples\react\javascript\basic\node_modules\which\which.js:89:16
gyp verb `which` failed at c:\UBS\Dev\Bryntam\gantt-1.1.5-trial-fixed\examples\react\javascript\basic\node_modules\isexe\index.js:42:5
gyp verb `which` failed at c:\UBS\Dev\Bryntam\gantt-1.1.5-trial-fixed\examples\react\javascript\basic\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed stack: 'Error: not found: python2\n at getNotFoundError (c:\\UBS\\Dev\\Bryntam\\gantt-1.1.5-trial-fixed\\examples\\react\\javascript\\basic\\node_modules\\which\\which.js:13:12)\n at F (c:\\UBS\\Dev\\Bryntam\\gantt-1.1.5-trial-fi
xed\\examples\\react\\javascript\\basic\\node_modules\\which\\which.js:68:19)\n at E (c:\\UBS\\Dev\\Bryntam\\gantt-1.1.5-trial-fixed\\examples\\react\\javascript\\basic\\node_modules\\which\\which.js:80:29)\n at c:\\UBS\\Dev\\Bryntam\\gantt-1.1.5-trial-fi
xed\\examples\\react\\javascript\\basic\\node_modules\\which\\which.js:89:16\n at c:\\UBS\\Dev\\Bryntam\\gantt-1.1.5-trial-fixed\\examples\\react\\javascript\\basic\\node_modules\\isexe\\index.js:42:5\n at c:\\UBS\\Dev\\Bryntam\\gantt-1.1.5-trial-fixed\\e
xamples\\react\\javascript\\basic\\node_modules\\isexe\\windows.js:36:5\n at FSReqWrap.oncomplete (fs.js:152:21)',
gyp verb `which` failed code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python c:\UBS\Dev\Miniconda3\python.EXE
gyp ERR! configure error
gyp ERR! stack Error: Command failed: c:\UBS\Dev\Miniconda3\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "<string>", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:275:12)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at maybeClose (internal/child_process.js:925:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "c:\\ubs\\dev\\tools\\nodejs\\v8.11.3\\node.exe" "c:\\UBS\\Dev\\Bryntam\\gantt-1.1.5-trial-fixed\\examples\\react\\javascript\\basic\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsas
s_ldflags=" "--libsass_library="
gyp ERR! cwd c:\UBS\Dev\Bryntam\gantt-1.1.5-trial-fixed\examples\react\javascript\basic\node_modules\node-sass
gyp ERR! node -v v8.11.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1


.

Can you suggest any alternative for this issue with node-sass 4.12.0 installation on build step post install inside package.json inside react basic example.
Do let me know if it is possible to schedule a quick call for resolution of this issue.
Attachments
2019-10-08T23_07_13_391Z-debug.log
(745.71 KiB) Downloaded 117 times

Post by sergey.maltsev »

Hi!

Try to run these commands in this order for _shared and basic (or try to find which command order works for you).
npm install
npm rebuild node-sass
npm run build
This may happen I guess when working in CMD and WSL in Windows with the same repos.

Post by AjithThomas »

Hi Sergey ,

Still on the same issue.
I will check for a solution and will revert back.
Thank you for your help.

Post Reply