cibernox / ember-power-calendar

Powerful and customizable calendar component for Ember
http://www.ember-power-calendar.com
Other
210 stars 118 forks source link

Error: File to import not found or unreadable: ember-power-calendar. #488

Closed olenderhub closed 5 months ago

olenderhub commented 5 months ago

Hello,

I upgraded:

-        "ember-concurrency": "4.0.1",
+        "ember-concurrency": "4.0.2",
-        "ember-power-calendar": "0.17.0",
-        "ember-power-calendar-moment": "^0.1.7",
+        "ember-power-calendar": "1.1.0",
+        "ember-power-calendar-moment": "1.0.2",
-        "moment-timezone": "0.5.34",
+        "moment-timezone": "0.5.45",

then when I am trying to run ember server

I got

Sass Syntax Error (SassCompiler) in /var/folders/8m/2z_3d_pj72b4zfp9_hvym4680000gn/T/broccoli-94456Fhqd6UStZr91/out-855-funnel_funnel_styles/app/styles/app.scss:10:1

Error: File to import not found or unreadable: ember-power-calendar.

I have

@import "ember-power-calendar";

in app.scss

previously it worked fine https://ember-power-calendar.com/docs/installation - there is looks like nothing changed

I am using this in app.scss because I have custom scss like

  @include ember-power-calendar(
  ...

What can I do with it?

mkszepp commented 5 months ago

@olenderhub can you tell me which ember version you are using?

Did you removed node_modules folder and package lock file after updating?

Which version of ember-cli-scss are you using?

olenderhub commented 5 months ago

@mkszepp

1.

"ember-data": "5.3.3",
"ember-cli": "5.8.0",
  1. Yes I removed node_modules folders and package lock after updating

  2. "ember-cli-sass": "11.0.1",

I am also using "node-sass": "^9.0.0"

and still have

Sass Syntax Error (SassCompiler) in /var/folders/8m/2z_3d_pj72b4zfp9_hvym4680000gn/T/broccoli-4641aGLiSyGZCUw9/out-844-funnel_funnel_styles/app/styles/app.scss:10:1

Error: File to import not found or unreadable: ember-power-calendar.
        on line 10 of ../../../../../../../var/folders/8m/2z_3d_pj72b4zfp9_hvym4680000gn/T/broccoli-4641aGLiSyGZCUw9/out-844-funnel_funnel_styles/app/styles/app.scss
>> @import "ember-power-calendar";
mkszepp commented 5 months ago

@olenderhub do you have as ember-cli-scss option onlyIncluded set to true?

Because this works only while addons are v1... since 1.0 rhis addon is a v2 addon. You can go on with onlyIncluded, but you need to set as option includePaths: ['node_modules/ember-power-calendar/']

olenderhub commented 5 months ago

@mkszepp

this is interesting in sassOptions (ember-cli-build) I have

    sassOptions: {
      implementation: nodeSass,
    },

So I assumed that is is false

but when added

    sassOptions: {
      implementation: nodeSass,
      includePaths: ['node_modules/ember-power-calendar/']
    },

This works!

Thank you for the suggestion, however, I am not sure why this works without onlyIncluded option

mkszepp commented 5 months ago

@olenderhub hmm... interesting... are you using embroider or classic build?

In our apps we are using dart sass, without any issues/configurations (like we have here in test-app / docs).

btw: node-sass is deprecated you should move early or later to dart sass (which is default, you dont need to set implementation)

olenderhub commented 5 months ago

@mkszepp

classic build - I want to move into Embroider, so this is why I started to upgrade ember-power-calendar (because got an error with addon)

I know that node-sass is deprecated. Migrating to dart sass is on the roadmap (anyway thank you for this information) The main reason why I haven't migrated yet to dart sass is I am using ember-component-css, so when trying to replace it I got

Sass Syntax Error (SassCompiler)

Top-level selectors may not contain the parent selector "&".

and some other issues. I need to carefully change flow from ember-component-css and probably also replace it

mkszepp commented 5 months ago

@olenderhub okay understand... maybe you are running in this error because ember-component-css is not playing well with V2 addons which are brining scss files (if you are using power select or basic dropdown, you need to do the same like with power calendar).

I think for now you have a good workaround, which is also working in future... so i think that we can close this issue