jsGanttImproved / ng-gantt

Gantt for Angular 8 based on jsgantt-improved
MIT License
61 stars 28 forks source link

importing from jsgantt-imporved #10

Closed mukeshmamidala closed 4 years ago

mukeshmamidala commented 5 years ago

hi team here its importing GanttChart instead of JSGantt where as jsgantt-improved module is exporting JSGantt import { JSGantt } from 'jsgantt-improved'; var /* @type {?} / g = this.editor = new JSGantt(this.ganttEditorContainer.nativeElement, 'week');

importing this is working fine instead of importing and getting an issue with module 1. 1.module.exports = jsGantt.JSGantt; error: Uncaught TypeError: Cannot assign to read only property 'exports' of object '[object Object]' 2.import { GanttChart } from 'jsgantt-improved'; var /* @type {?} / g = this.editor = new GanttChart(this.ganttEditorContainer.nativeElement, 'week');

it will work fine in locally but in pcf its getting fail

mukeshmamidala commented 5 years ago

if i try to work on it in pcf its showing WARNING in ./node_modules/ng-gantt/fesm5/ng-gantt.js "export 'GanttChart' was not found in 'jsgantt-improved' showing this error in build and if i deploy in production error: Uncaught TypeError: Cannot assign to read only property 'exports' of object '[object Object]' this error was coming in browser console

how can we resolve it my version Angular @5.2.0 ng-gantt@1.8.9 jsgantt-improved@^1.8.7

mariohmol commented 5 years ago

sorry.. i could not find how to reproduce this (what is pcf?)

can u try to make an example with your angular version using this https://stackblitz.com/edit/angular-ng-gantt ?

mukeshmamidala commented 5 years ago

pcf is pivotal cloud foundary iam trying to build in jenkins yes i have tried with my angular version its working fine in local when im trying to build in prod environment its throwing this error Cannot assign to read only property 'exports' of object '[object Object]' i have done the same process as you mentioned in document there is no issue with code there is an issue in node module when im trying to compile in jenkins the module is exporting jsGantt in jsgantt-improved and in ngGantt the module is importing GanttChart so its showing module is not found

mariohmol commented 5 years ago

i see.. really dont know what is going on jenkins..

try to check the typescript version in your computer..

seems to be related how the jsgant-improved is exported.. not the ng-gantt itself

mariohmol commented 5 years ago

hi do you have news about it?

can u double check with latest versions for ng-gantt and jsgantt?

this is building now with travis and e2e tests https://travis-ci.com/jsGanttImproved/ng-gantt

Suyog-Sankey commented 4 years ago

Hi, Any update on how you solved second issue ?

mariohmol commented 4 years ago

what is the second issue?

Suyog-Sankey commented 4 years ago

when im trying to compile in bamboo server the module is exporting jsGantt in jsgantt-improved and in ngGantt the module is importing GanttChart. so its showing module is not found

mariohmol commented 4 years ago

maybe share the logs or ng info

mariohmol commented 4 years ago

did u try the latest version as well?

vaibhavgsankey commented 4 years ago

@mariohmol here is the error that we are getting: build 17-Dec-2019 18:42:12 [ERROR] ERROR in ./ng-gantt/fesm2015/ng-gantt.js 37:36-46 build 17-Dec-2019 18:42:12 [ERROR] "export 'GanttChart' was not found in 'jsgantt-improved' build 17-Dec-2019 18:42:12 [ERROR] npm ERR! code ELIFECYCLE build 17-Dec-2019 18:42:12 [ERROR] npm ERR! errno 1

mariohmol commented 4 years ago

can u run ng v and then paste here the results? we need to know what angular versions are used here

vaibhavgsankey commented 4 years ago

@mariohmol I'm unable run 'ng v' since the build is generated from bamboo plan. but in my package.json I have specified following: "@angular/cli": "^8.2.0", "@angular/compiler-cli": "~8.2.0",

mariohmol commented 4 years ago

i migrated this module to ang9... can u make this in your project?

vaibhavgsankey commented 4 years ago

@mariohmol Our project is in the deployment stage and we can't do any major changes like moving to angular version 9. The project is working fine in our development environment (OS: Windows 10) but failing in Bamboo Plan (OS: RHEL 7). Can OS affect the complication of jsgantt-improved?

mariohmol commented 4 years ago

I see... maybe is not a nodejs or npm version u have there that is old?

this is the travis build https://travis-ci.com/jsGanttImproved/ng-gantt/builds/141223066

the environment there is:

$ node --version
v10.9.0
$ npm --version
6.2.0
$ nvm --version
0.35.1

If I´m not wrong they use ubuntu/debian there.. so its a linux environment as well.. should work on RHEL

vaibhavgsankey commented 4 years ago

I have specific the node version as 10.16.0. I will try with npm version 6.2.0 and nvm 0.35.1

vaibhavgsankey commented 4 years ago

Hi @mariohmol we have resolved the issue. thanks a lot for the help! Please close the issue.

mariohmol commented 4 years ago

Hi! great to hear that.. can u share with us the solution?