Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WARNING: Replace fill-available to stretch, because spec had been changed #3989

Closed
JaxonWright opened this issue Jul 21, 2020 · 60 comments
Closed

Comments

@JaxonWright
Copy link

Expected behavior.

Not have warnings like this when building node dependency with a project.

Actual behavior.

image

Steps to reproduce the problem.

Build a project that has this project as one of its npm dependencies

Editor version.

3.1.1

OS.

Windows 10 1909

Browser.

Irrelevant

@flonussi
Copy link

flonussi commented Jul 22, 2020

This exact issue appeared today for me also.
But I'm stil on 3.1 and didn't touch or update froala or any other dependency of my project in weeks, but today this warning started to appear...
In addition to that issue I also get a warning about a crypto module, but as I already said, I didn't touch anything
image

@jvmills
Copy link

jvmills commented Jul 22, 2020

Same for me

`WARNING in ./node_modules/froala-editor/css/froala_editor.pkgd.min.css (./node_modules/css-loader??ref--5-2!./node_modules/postcss-loader/src??postcss0!./node_modules/froala-editor/css/froala_editor.pkgd.min.css)
Module Warning (from ./node_modules/postcss-loader/src/index.js):
Warning

(7:52021) Replace fill-available to stretch, because spec had been changed
@ ./resources/sass/app.scss (./node_modules/css-loader??ref--5-2!./node_modules/postcss-loader/src??postcss0!./node_modules/sass-loader/dist/cjs.js??ref--5-4!./resources/sass/app.scss) 9:10-173
@ ./resources/sass/app.scss`

@marctaule
Copy link

Same for me...

@wes337
Copy link

wes337 commented Jul 24, 2020

Same, can this please get fixed?

@qingmang
Copy link

Same for me...

@arwinvdv
Copy link

I had contact with Froala today and they will fix the issue in v3.2.4 what will be released in a few months.

@devstack-be
Copy link

@arwinvdv Thanks for the information ;)

@micheleh
Copy link

Is there a way to work around this until a fix is provided?

@devstack-be
Copy link

normally npm is not blocking the script. it's just a warning. If you want to fix it, you can explore the package, do a search and replace and replace "fill-available" to "stretch". But it's only temporary and it's better waiting a real fix.

@paras-deshbhratar
Copy link

Even I am also getting the same warning in console.
Thanks @arwinvdv. Will wait till they release v3.2.4

@marcodeluca
Copy link

Thanks for the update, having the same issue.

@marting169
Copy link

gracias!

@manshu
Copy link

manshu commented Aug 16, 2020

I've the same issue. Any update on this?

@ffjanhoeck
Copy link

Same issue :)

@rockingthecode
Copy link

having same problem here. i have been searching for an hour and its frustrating. i hope it fixed very soon.

@kylepeeler
Copy link

+1, seeing same issue here as well

@robjac
Copy link

robjac commented Sep 11, 2020

@taylormaguire
Copy link

Hi Everyone, as noted earlier, it looks like they will fix this in v3.2.4, however if you want to get rid of the error you can open the froala_editor.pkgd.min.css file in your node_modules and do a search and replace

Search: fill-available
Replace: stretch

Save the file and now your builds wont fail.

Warning: as you are editing a vendor node library file, any npm update or re-install of the package will require these changes gain until they fix in the future update.

@kylepeeler
Copy link

Is there a fix that does not require modifying node_modules?... This is not a fix that could be done in any situation but locally, considering node_modules aren't committed (at least for my project...)

@herbertharriola
Copy link

Is there a fix that does not require modifying node_modules?... This is not a fix that could be done in any situation but locally, considering node_modules aren't committed (at least for my project...)

I have the same problem!! It would be nice for them to release the fix soon!!

@shroomlife
Copy link

Same problem here. Is there a fix to surpress thiss message in the meantime?

@iicdii
Copy link

iicdii commented Oct 30, 2020

I suppressed the message by add string-replace-loader in webpack config rules.

// webpack.config.js
module.exports = {
  // ...
  module: {
    rules: [
      {
        test: /froala_editor\.pkgd\.min\.css$/,
        loader: 'string-replace-loader',
        options: {
          search: /fill-available/g,
          replace: 'stretch'
        }
      }
    ]
  }
}

@shroomlife
Copy link

I suppressed the message by add string-replace-loader in webpack config rules.

// webpack.config.js
module.exports = {
  // ...
  module: {
    rules: [
      {
        test: /froala_editor\.pkgd\.min\.css$/,
        loader: 'string-replace-loader',
        options: {
          search: /fill-available/g,
          replace: 'stretch'
        }
      }
    ]
  }
}

works for me! thank you a lot @iicdii 👏👏👏

@Taskle
Copy link

Taskle commented Dec 10, 2020

Hi folks! I saw 3.2.4 came out yesterday, and admittedly I've been tracking it closely for the fix to this issue per the comment below:

I had contact with Froala today and they will fix the issue in v3.2.4 what will be released in a few months.

I didn't see it in the release notes:
https://github.com/froala/wysiwyg-editor/releases/tag/v3.2.4

and updating, I see the issue persists.

Can someone from Froala kindly advise? For those of us who don't want to manually edit our third party packages, it would be great to get an update!

@EthanRBrown
Copy link

Agreed, @Taskle ! This has been a HUGE thorn in our sides...I know it may seem like a small thing, but we have a clean console policy, and the time it takes to sort past those warnings every time we see something real that needs to be addressed adds up. Plus it's just a giant eyesore in something we take pride in. This needs to be fixed! If Froala doesn't respond to this issue soon, we'll certainly be looking towards another rich text editor and not renewing our subscription.

I was so happy to see that 3.2.4 dropped, and you can imagine my disappointment when I upgraded, hoping to finally see a clean console and....

image

@yuriy-vasilyev
Copy link

@EthanRBrown, how many options do we have out there? :)

@arwinvdv
Copy link

I just checked the new version and as said above, warnings still exists. So I looked to the mail they send me and I see that I wrote it wrong here.
They wrote version version 3.4 not 3.2.4... So we have to wait a few months more. Until then I think the fix of @iicdii will work.

@kylepeeler
Copy link

So since this still seems to be an issue (🙄)... here is how we handled it in our app... I just brought in webpack-filter-warnings-plugin, and applied it to my webpack config like so:

const baseConfig = {
  name: pkg.name,
  entry: [paths.appIndexJs, 'whatwg-fetch'],
  output: {
    path: path.resolve(__dirname, '../dist'),
    publicPath: '/',
  },
  module: {
    rules: [
      configureFontLoader(),
      configureImageLoader(),
      configureIconLoader(),
    ],
  },
  resolve: resolveConfig,
  plugins: [
    new WebpackNotifierPlugin({
      title: 'Webpack',
      excludeWarnings: true,
      alwaysNotify: true,
    }),
    new webpack.ProvidePlugin({
      FroalaEditor: 'froala_editor.min.js/froala_editor.pkgd.min.js',
    }),
    /*
    @HACK: Froala currently has a warning that postcss throws, and the only solution from the author is basically to edit node_modules ~until 3.2.4 is released~...
    Well since that won't work for us (node_modules is not committed), I have decided to filter the warnings so it doesn't make our logs ginormous between now
    and when it is released.

    Relevant Issue: https://github.com/froala/wysiwyg-editor/issues/3989

    @FUTURE: remove me + corresponding plugin ~when froala-editor is upgraded >=3.2.4~ (also remember to update storybook/main.js)!
    */
    new FilterWarningsPlugin({
      exclude: /Replace fill-available to stretch/,
    }),
  ],
};

💨 Poof, no more warnings 😄

@Taskle
Copy link

Taskle commented Dec 14, 2020

For those of us that are using React's CRA and not ejected to use custom webpack configs, sounds like this is only an option if we either eject or use CRACO. Sounds like we're stuck waiting until 3.4... if folks who are also using CRA have thoughts on a workaround without a ton of work/changes/additions, feel free to share! Indeed this has been the only warning lingering in our app for months, so unfortunate that it will continue to linger.

@EthanRBrown
Copy link

EthanRBrown commented Jan 11, 2021

@ansh-les I will. At this point, I'm tempted to go with CKEditor 5, though I haven't investigated the options yet. Quill is also very interesting, more of a new kid on the block.

@a-bit-too-literal
Copy link

This is also causing us to reassess our choice of froala. Does anyone know why it is taking so long to resolve?

@kgish
Copy link

kgish commented Jan 15, 2021

This is VERY annoying indeed.

For the time being I have added the following script to my package.json file:

 "froala:css:fix": "sed -i 's/fill-available/stretch/g' ./node_modules/froala-editor/css/froala_editor.pkgd.min.css",

However, this needs to be executed after every npm install.

@sybers
Copy link

sybers commented Feb 1, 2021

@kgish Nice one-liner, worth placing it inside a postinstall script so it runs automatically :)

@JCanlett
Copy link

JCanlett commented Feb 1, 2021

Glad I'm not alone here. Just upgraded to 3.2.6 after dealing with the crazy licensing issues.. Now console is full of warnings. Is this still slated for 3.4? that seems like a long way out. Will be on Angular 12 by then.

@ac-andyta
Copy link

You can also have a node solution to support all systems (Windows):

Create a file called patch.js in the same folder as your package.json:

const fs = require('fs');

const froalaMinCss = 'node_modules/froala-editor/css/froala_editor.pkgd.min.css';
fs.readFile(froalaMinCss, 'utf8', function (err, data) {
  if (err) {
    throw err;
  }
  const result = data.replace(/fill-available/g, 'stretch');
  fs.writeFile(froalaMinCss, result, 'utf8', function (e) {
    if (e) throw e;
  });
});

Essentially, it does the same thing as the sed command.

Then, add it to your postinstall in package.json like "postinstall": "node patch.js" or "postinstall": "... && node patch.js" if you have other commands.

Finally, run npm install.

@dejanmartinovic
Copy link

The issue has already been solved. The fix will be available in version 3.3.3 (mid-March at the latest). Thanks

@msalmankarim
Copy link

Experiencing the same issue :)

@nirvparekh
Copy link

The issue has already been solved. The fix will be available in version 3.3.3 (mid-March at the latest). Thanks

March has ended. not fixed yet.

@adrianksiezarczyk
Copy link

March has ended. not fixed yet.

It's 30.03, UTC 10AM. They still have time.

@qmakani
Copy link

qmakani commented Apr 1, 2021

I see a PR open since Aug, 2020 that fixes this issue:
#4006

The issue and the PR are not linked though. Can we please get it merged?

@gekikara404
Copy link

The issue has already been solved. The fix will be available in version 3.3.3 (mid-March at the latest). Thanks

March has ended. not fixed yet ( 2 )

@HernanGH
Copy link

HernanGH commented Apr 8, 2021

Same issue here! @dejanmartinovic do you know when the version 3.3.3 will be available?

@zdm
Copy link

zdm commented Apr 20, 2021

I think, nobody from support reads this threads.
Don't waste your time, guys. ))

@ilyaskarim
Copy link

The fix for this issue will be released in the next editor release which is expected to be released by the first week of May.

@nirvparekh
Copy link

The fix for this issue will be released in the next editor release which is expected to be released by the first week of May.

which year???

@horsemanV
Copy link

Snark aside, thanks for the update

@ValentinSolod
Copy link

any updates ?

@HernanGH
Copy link

HernanGH commented May 4, 2021

The fix for this issue will be released in the next editor release which is expected to be released by the first week of May.

This week?

@MaksimEpifanau
Copy link

This day?

@HernanGH
Copy link

This month?

@jaymathew
Copy link

This year?

@zdm
Copy link

zdm commented May 14, 2021 via email

@arwinvdv
Copy link

arwinvdv commented May 18, 2021

I don't know where @ilyaskarim got his information, but I just mailed Froala support and they say:

The next release is v3.3 (renamed as v4.0) and is scheduled to be released by the mid of June.

Edit: Apparently if you ask when the next release is, they are assuming a major release.

@erikramalho
Copy link

I don't know where @ilyaskarim got his information, but I just mailed Froala support and they say:

The next release is v3.3 (renamed as v4.0) and is scheduled to be released by the mid of June.

Edit: Apparently if you ask when the next release is, they are assuming a major release.

Awesome! Now Froala will charge us to solve this issue, since we all have V3 licensing… great way to force us tu buy a new license.🤮

@sssppp6
Copy link

sssppp6 commented May 20, 2021

Finally fixed in https://froala.com/wysiwyg-editor/changelog/#3.2.7

@harsh-100
Copy link

harsh-100 commented Dec 25, 2022

/{YOUR_PROJECT PATH}/node_modules/react-pure-modal/dist/react-pure-modal.min.css

(go to this file path , then follow these steps)

-- first search for the word 'fill-available '
-- then just replace it with 'stretch'
-- Your problem will be solved and there will be no more warning for this ✌️

@Icodezhan
Copy link

is ok?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests