Skip to content

TypeError Plugin: netlify-cli: memoizeOne is not a function #2202

Closed

Description

@trein-homeroom

Describe the bug

netlify cli throws error on usage

To Reproduce

Steps to reproduce the behavior:

  1. Install latest version via npm i -g netlify-cli where latest version is currently v3.21.5
  2. Run netlify dev
  3. See that the CLI exits with an error

Configuration

$ npx envinfo --system --binaries --npmPackages netlify-cli --npmGlobalPackages netlify-cli
npx: installed 1 in 1.63s

  System:
    OS: Linux 4.19 Ubuntu 18.04.4 LTS (Bionic Beaver)
    CPU: (4) x64 Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz
    Memory: 3.19 GB / 7.29 GB
    Container: Yes
    Shell: 4.4.20 - /bin/bash
  Binaries:
    Node: 10.21.0 - ~/.nvm/versions/node/v10.21.0/bin/node
    Yarn: 1.22.4 - /usr/bin/yarn
    npm: 6.14.6 - ~/.nvm/versions/node/v10.21.0/bin/npm
  npmGlobalPackages:
    netlify-cli: 3.21.5

Expected behavior

No error

CLI Output

netlify dev
TypeError Plugin: netlify-cli: memoizeOne is not a function
module: @oclif/[email protected]
task: runHook init
plugin: netlify-cli
root: /home/vagrant/.nvm/versions/node/v10.21.0/lib/node_modules/netlify-cli
See more details with DEBUG=*
    TypeError: memoizeOne is not a function

Additional context

Output above is from my system, but this is breaking on our build in Circleci, so I don't think it's just my system.

Activity

  1. added
    type: bug
    on Apr 22, 2021
  2. shukryzablah commented on Apr 22, 2021

    @shukryzablah

    Our circleci ran into the same error. Tried downgrading to 3.21.0, that didn't help. (We use the circleci/node:12 image)

  3. unclejustin commented on Apr 22, 2021

    @unclejustin

    Came here to post the same error :( downgrading as far as 3.18.0 didn't help

  4. unclejustin commented on Apr 22, 2021

    @unclejustin

    Wonder if this is related: alexreardon/memoize-one#37

  5. trinta commented on Apr 22, 2021

    @trinta

    Seeing the same issue. The NPM package for memoize-one was updated 2 hours ago, and our issues started at the same time, so that seems to be a likely culprit that the NPM package contains the export change and the function isn't being imported correctly.

    To add to that - we are unable to deploy our Netlify site right now which is kinda of a... problem.

  6. liam-careerhub commented on Apr 22, 2021

    @liam-careerhub

    Same issue here; tried downgrading as far as 3.1.1 and no improvement. Doing a manual deployment via the Netlify UI for now.

  7. alucardu commented on Apr 23, 2021

    @alucardu

    Same issue here.

  8. nolessafool commented on Apr 23, 2021

    @nolessafool
    Contributor

    💡 update: we have released a new version 3.21.6, which fixes this issue. please run npm i -g netlify-cli to get the latest version of CLI.


    Hey folks - while our team looks into this, be aware that we may not get a fix today (we definitely will, tomorrow).

    However, to unblock you, there are other methods of deployment which will not suffer this problem:

  9. keiko713 commented on Apr 23, 2021

    @keiko713
    Contributor

    Oops sorry, closing the PR looks like closed this issue! A new (fixed) version is not released yet, but will be shortly! We'll keep you posted.

  10. keiko713 commented on Apr 23, 2021

    @keiko713
    Contributor

    Updated fool's earlier comment too, but we have released a new version of CLI 3.21.6 which fixes this issue. Please run npm i -g netlify-cli to get the latest version of CLI.
    Sorry for the inconvenience, and thank you all for reporting this!
    Also special thanks to @jsutaria for opening up a PR for the fix, we didn't end up using that PR but contribution was very much appreciated!

  11. marcelgerber commented on Apr 23, 2021

    @marcelgerber

    We are still running into this issue for our Github Actions-based deploy (using https://github.com/netlify/actions/tree/master/cli), even though it is already using version 3.21.6 of netlify-cli.

    EDIT: It turns out that yarn global add netlify-cli resolves dependencies differently, and apparently it resolves to the wrong version of memoize-one (or, probably, disregards the package-lock.json entirely).

    You can see the full run here: https://github.com/owid/covid-19-data/runs/2418123449#step:4:8

    [4/4] Building fresh packages...
      success Installed "[email protected]" with binaries:
            - ntl
            - netlify
      Done in 35.01s.
    
    [...]
    
        TypeError: memoizeOne is not a function
    
  12. JGAntunes commented on Apr 23, 2021

    @JGAntunes
    Contributor

    Hey @marcelgerber (and others who may still be following this thread). We've released version 3.21.7 and more recently 3.21.8 which should have fixed the issue - alexreardon/memoize-one#116 - permanently both at the cli level and at @netlify/build. Do let us know if you're still running into some issues though 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions