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: flatten is not a function #68

Closed
liliansousa opened this issue Nov 25, 2019 · 6 comments
Closed

Warning: flatten is not a function #68

liliansousa opened this issue Nov 25, 2019 · 6 comments

Comments

@liliansousa
Copy link

liliansousa commented Nov 25, 2019

Using assemble with multiple subtasks is returning an issue with a dependency

Running "assemble:localhost" (assemble) task
Warning: flatten is not a function Use --force to continue.

Users that installed it and the lock is array-flatten - version: 3.0.0 is not working but the assemble subtasks are working with the old one "version": "2.1.2",

"array-flatten": {
      "version": "3.0.0",
      "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-3.0.0.tgz",
      "integrity": "sha512-zPMVc3ZYlGLNk4mpK1NzP2wg0ml9t7fUgDsayR5Y5rSzxQilzR9FGu/EH2jQOcKSAeAfWeylyW8juy3OkWRvNA==",
      "dev": true
    },

"array-flatten": {
      "version": "2.1.2",
      "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz",
      "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==",
      "dev": true
    },
@assemblebot
Copy link

@liliansousa Thanks for the issue! If you're reporting a bug, please be sure to include:

  • The version of assemble you are using.
  • Your assemblefile.js (This can be in a gist)
  • The commandline output. (Screenshot or gist is fine)
  • What you expected to happen instead.

@StanislavMachel
Copy link

I have the same problem: Warning: flatten is not a function Use --force to continue
I opened on StackOverflow:

https://stackoverflow.com/questions/59155976/warning-flatten-is-not-a-function-use-force-to-continue

I noticed that if I downgrade grunt-assemble from 0.6.0 to 0.4.0 this issue disappears. May be somebody has a fix for this problem?

@doowb
Copy link
Member

doowb commented Dec 4, 2019

@liliansousa thank you for the issue. I started looking into this last week but didn't finish fixing it due to Thanksgiving. I think I have a fix and will try to get it pushed up soon. Your comment about the versions in the lock file helped.

@doowb
Copy link
Member

doowb commented Dec 4, 2019

@liliansousa and @StanislavMachel please try getting the latest modules and running your build now. I patched a dependency to ensure the correct version of array-flatten will be used so you might have to delete lock files and clear npm cache.

@StanislavMachel
Copy link

@doowb Thanks! Now all works properly.

@doowb
Copy link
Member

doowb commented Dec 5, 2019

Thanks for verifying! I'm going to close this issue now, but @liliansousa if you still have an issue, please let me know so I can look into it further.

@doowb doowb closed this as completed Dec 5, 2019
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

4 participants