angular-calendar-week-hours-view icon indicating copy to clipboard operation
angular-calendar-week-hours-view copied to clipboard

Angular 6.0+ support

Open nemupm opened this issue 7 years ago • 12 comments

Is there any plan to support Angular 6.0+?

nemupm avatar May 22 '18 12:05 nemupm

if you take a view on the node_module package folder of your app, you can see there is another folder also called node_modules. If you delete its content the component is running fine.

jfalmoguera avatar May 23 '18 14:05 jfalmoguera

download the code in both install the npm package.

jfalmoguera avatar May 23 '18 15:05 jfalmoguera

Do you mean to remove this package's dependencies? Yeah, I added the following rows to package.json and did yarn install as a work-around.

  "resolutions": {
    "@angular/core": "^6.0.2",
    "angular-calendar": "^0.25.2"
  }

It works but not proper-way because this work-around uses "Selective dependency resolutions" only available for yarn.

nemupm avatar May 28 '18 07:05 nemupm

@nemupm How exactly did you resolve the issue? The response here isn't very clear to me, I am not seeing two node modules folders.

iSeeJay avatar Jun 13 '18 20:06 iSeeJay

@iSeeJay I did the following steps.

  1. remove the packages by the commandrm -rf ./node_modules.
  2. add lines I commented above(sorry I forgot last line). After that, package.json looks like this.
{
  "name": "xxx",
  "version": "0.0.0",
  "license": "MIT",
...
  "dependencies": {
    "@angular/animations": "^6.0.2",
...
  },
  "devDependencies": {
    "typescript": "~2.7.2"
...
  },
  "resolutions": {
    "@angular/core": "^6.0.2",
    "angular-calendar": "^0.25.2",
    "angular-resizable-element": "^3.0.0"
  }
}
  1. reinstall packages by the command yarn install

nemupm avatar Jun 14 '18 04:06 nemupm

i do not use yarn, is there a workaround without yarn? thanks!

arielmirra avatar Jun 19 '18 02:06 arielmirra

Are there any updates on this? I have forked the repo, updated all dependencies for Angular 6, tested the package itself. Then I've ran ng build and pushed to my repo, but every time I install the package from my github repository, I get Module not found error in app.module during ng serve

DamirPirija avatar Jun 27 '18 10:06 DamirPirija

it already works in angular 6 for me, I just get the annoying dependancies warning in the console

update: It doensn't work

rubenheymans avatar Jun 27 '18 12:06 rubenheymans

@rubenheymans That is odd, I get issue described here, https://github.com/angular/angular/issues/21925, and I can't build/serve my project.

Basically, I think the issue is that there is @angular/core in ./node_modules/angular-calendar-week-hours-view/node_modules/

I have updated all dependencies in the package, fixed rxjs issues, transferred from "dependencies" to "peerDependencies", etc. and node_modules does not get created inside the package (which should solve my issue). I don't think I export the package properly, since when I install both mine and this package, mine does not have the following folders:

  • node_modules/angular-calendar-week-hours-view/bundles
  • node_modules/angular-calendar-week-hours-view/esm5
  • node_modules/angular-calendar-week-hours-view/esm2015

Are you using yarn and the solution as above? I'm using npm so I cannot apply the same solution.

DamirPirija avatar Jun 27 '18 13:06 DamirPirija

sorry I openend the project again to check but I just copied the code into my project and completely customised it

rubenheymans avatar Jun 27 '18 13:06 rubenheymans

Here's how I was able to serve/build on angular 6 and version 1.0.2 of this package using npm:

  • npm install rxjs-compat
  • remove "node_modules/angular-calendar-week-hours-view/node_modules/" (this is the duplicate node_modules people are talking about that needs to be removed. This is relative to the same directory that contains your src/ directory for the app)
  • completely stop and start 'ng serve'

Be aware that npm is going to put that duplicate node_modules in if you start installing/updating packages and you'll have to remove it again; that tripped me up a few times. This isn't a great long term solution, but its letting me test out angular 6 until we hopefully get a fixed npm version.

joeyab avatar Jun 28 '18 05:06 joeyab

Thanks @joeyab, I've tried your solution and it works, although it is not a good long term solution. What is bugging me is that I think that I've almost made everything work, and could submit a PR, but I somehow do not pack/export/build the package properly :/

Maybe @diegofsza could have some suggestions if he has the time

DamirPirija avatar Jun 28 '18 08:06 DamirPirija