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

Node#moveTo was deprecated. Use Container#append. #379

Closed
OlehDutchenko opened this issue Jun 21, 2017 · 18 comments
Closed

Node#moveTo was deprecated. Use Container#append. #379

OlehDutchenko opened this issue Jun 21, 2017 · 18 comments

Comments

@OlehDutchenko
Copy link

Get message when using cssnano as plugin in gulp-postcss

Node#moveTo was deprecated. Use Container#append.
@andyjansson
Copy link
Contributor

What version of cssnano are you using?

@OlehDutchenko
Copy link
Author

3.10.0

@andyjansson
Copy link
Contributor

Do you have a stacktrace?

@ben-eb
Copy link
Collaborator

ben-eb commented Jun 22, 2017

It's because cssnano 3.x isn't officially compatible with PostCSS 6 - it mostly works but we use a couple of old methods, so that's why you see the warnings. Can you give version 4 a try and let me know how you get on?

npm install cssnano@next

@OlehDutchenko
Copy link
Author

Aha. That helped.
Tell me, is this a stable release? Can I use it in my work, or better wait for the official release cssnano@4.x?

@OlehDutchenko
Copy link
Author

@andyjansson Didn't quite understand what you mean

@ben-eb
Copy link
Collaborator

ben-eb commented Jun 23, 2017

There were a lot of changes that were done without publishing for a while, so I wanted to make sure everything was OK before solidifying the API. I think it's mostly there though, but would appreciate some feedback. 😄

@OlehDutchenko
Copy link
Author

Ок. thx for helping

@guidobouman
Copy link

@ben-eb When switching from 3.10.x (packaged with css-loader) to 4.0.0-rc.1 and loading it through postcss I went from a 20% decrease to an 10% increase of my CSS... Any idea how that might be happening? Removed cssnano from my package.json for now, and all seems fine apart from this one warning.

I'm on the latest postcss & postcss-loader, and run autoprefixer (together with other plugins) through it successfully.

PS: I do use the following config.

{
  discardUnused: {
    fontFace: false // Required for fonts.css
  }
}

@guidobouman
Copy link

Wait, I'll open a new issue.

@jimblue
Copy link

jimblue commented Jul 22, 2017

Getting exactly the same error message on my webpack config using postcss.
Will wait for stable version 4 as the current version is actually more effective.
Any idea of the release date?
Thanks anyway for this nice piece of shrinking code.

@ben-eb
Copy link
Collaborator

ben-eb commented Jul 22, 2017

@jimblue With the default preset yes, it is less effective but this is by design. From the release notes:

  • By default, the following transforms are no longer applied to any input CSS.
    You may see an increased output file size as a result:

    • autoprefixer
    • postcss-discard-unused
    • postcss-merge-idents
    • postcss-reduce-idents
    • postcss-zindex

Note that you can load cssnano-preset-advanced instead which does contain
these transforms.

Not sure on final release date, I think this will require another release candidate. Mostly it's there though.

@mischah
Copy link

mischah commented Nov 25, 2017

Hej @ben-eb,

I just saw that there where 6 commits to master since this v4.0.0-rc.2.
Do have plans when to release 4.0.0 final?

Cheers, Michael

@rcalabro
Copy link

rcalabro commented Nov 27, 2017

+1
cssnano@next is breaking the build here

@rcalabro
Copy link

Something to do with 'advanced' presets:
ModuleBuildError: Module build failed: ModuleBuildError: Module build failed: Error: Cannot load preset "advanced". Please check your configuration for errors and try again.

What is the equiv for v4.0.0-rc.2.

@TheY2T
Copy link

TheY2T commented Dec 14, 2017

I updated to v4.0.0-rc.2 but I'm still getting the same error unfortunately...

@ashkaushik
Copy link

ashkaushik commented Apr 13, 2018

Please update "$angular/cli" to "1.7.3"

Step 1: npm remove @angular/cli
Step 2: npm cache clean --force
Step 3: npm install -g $angular/cli@1.7.3

Still stuck then update your package.json with

{ "$angular/cli": "1.7.3" } and run npm install

Note: Please replace $ with @ before angular/cli

Tested and working for me

@zymr-keshav
Copy link

typo in Step3:

npm install -g $ @angular/cli@1.7.3

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

10 participants