search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

ERROR in ./node_modules/daypilot-pro-angular/daypilot-angular.ngfactory.js

Asked by Tara
4 years ago.

Hi!

I am using Angular 7, cli 7.1.2 and latest version av node.js.

ng build --prod works fine locally but on our devops server im getting this error:

ERROR in ./node_modules/daypilot-pro-angular/daypilot-angular.ngfactory.js
Module not found: Error: Can't resolve './daypilot-angular' in '...\node_modules\daypilot-pro-angular'

Im really stuck och appreciate any help!

Comment posted by Dan Letecky [DayPilot]
4 years ago.

I'd try deleting node_modules on the server. If the tooling versions are the same you should get the same results on both machines after a clean "npm install".

Comment posted by Tara
4 years ago.

Thansk for your reply.

I have already tried, not helping!

Comment posted by Tara
4 years ago.

I can see that the structure of daypilot-pro-angular folder under nodemodules is different locally and on the server but I don't know how to fix this!

Comment posted by Dan Letecky [DayPilot]
4 years ago.

Do you use the same DayPilot Pro version at both places?

The structure has changed in 2020.1.4258 (because of Angular 9 compatibility):
https://javascript.daypilot.org/daypilot-pro-for-javascript-2020-1-4258/

Comment posted by Dan Letecky [DayPilot]
4 years ago.

Also, do you see any differences between package-lock.json from the two machines?

Comment posted by Dan Letecky [DayPilot]
4 years ago.

It looks like Angular CLI might be broken - the error can be reproduced in Angular 7 and Angular 8 projects generated by https://builder.daypilot.org/. This used to work fine.

Comment posted by Tara
4 years ago.

Yes I am using the same version of angular pro both locally and on server.

I always update the version in my package.json file, should I do sth in package-lock.json as well? In that case where and how? I always thought package-lock.json would be regenerated and updated during build.

By your last response you mean that this is a bug? Should I go back to some version of CLI or angular-pro to fix this?

Appreciate your help, I must resolve thus asap.

Comment posted by Tara
4 years ago.

Instead of js files under daypilot-pro-angular, Im getting two folders: bundles and esm5, each 2 js files under.
Locally, I have js files directly under daypilot-pro-angular

Comment posted by Dan Letecky [DayPilot]
4 years ago.

Then you are using different DayPilot Pro versions. Check node_modules/daypilot-pro-angular/package.json to see the actual version number.

Comment posted by Tara
4 years ago.

Im using latest version of daypilot-angular-pro

Comment posted by Tara
4 years ago.

Ok, I will check the version & get back soon...

Comment posted by Dan Letecky [DayPilot]
4 years ago.

It looks like for DayPilot Pro version 2020.1.4258+ this can be fixed by creating node_modules/daypilot-pro-angular/daypilot-angular.js file with the following content:

export * from './esm5/daypilot-angular.js';

It will be fixed in the package and included in the next release. You can use this workaround for now or roll back to version 2020.1.4216:
https://javascript.daypilot.org/daypilot-pro-for-javascript-2020-1-4216/

> Instead of js files under daypilot-pro-angular, Im getting two folders: bundles and esm5, each 2 js files under.

This structure is used by version 2020.1.4258 and higher.

> Locally, I have js files directly under daypilot-pro-angular

This structure is used by version 2020.1.4216 and lower.

Comment posted by Tara
4 years ago.

Yes, saw it now, my local was an older version, maybe have run install a long time ago....rolled back to that version you mentioned...structure is fine now...is building right now...brb :)

Comment posted by Tara
4 years ago.

YEEEEY its working :)))) You just made my satureday much nicer!

THANK YOU :)
I have been struggling with this in 3 days!

Comment posted by Dan Letecky [DayPilot]
4 years ago.

Great, thanks for the update!

Answer posted by Dan Letecky [DayPilot]
4 years ago.

This issue is now fixed in the latest sandbox build (2020.1.4301).

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.