Warning: flatten is not a function
liliansousa opened this issue · 6 comments
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
},
@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.
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?
@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.
@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.
@doowb Thanks! Now all works properly.
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.