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

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

Closed
trein-homeroom opened this issue Apr 22, 2021 · 11 comments · Fixed by #2204
Closed

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

trein-homeroom opened this issue Apr 22, 2021 · 11 comments · Fixed by #2204
Labels
type: bug code to address defects in shipped code

Comments

@trein-homeroom
Copy link

trein-homeroom commented Apr 22, 2021

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/config@1.17.0
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.

@trein-homeroom trein-homeroom added the type: bug code to address defects in shipped code label Apr 22, 2021
@shukryzablah
Copy link

shukryzablah commented Apr 22, 2021

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

@unclejustin
Copy link

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

@unclejustin
Copy link

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

@trinta
Copy link

trinta commented Apr 22, 2021

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.

@liam-careerhub
Copy link

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

@alucardu
Copy link

Same issue here.

@fool
Copy link
Contributor

fool commented Apr 23, 2021

💡 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:

  • our legacy CLI - we'll deprecate it someday soon, but for now, should still work: https://github.com/netlify/netlifyctl
  • API. There are several workflows, one of which is "send a zipfile of your built site": https://docs.netlify.com/api/get-started/#deploy-via-api
  • drag and drop. This is the worst deployment method since it is dependent on a very solid network connection, your computer having a ton of free memory, and is still prone to failure for larger sites, but if you have a small one, it might work well. In this case "failure" will look like a stuck deploy, not a partial publish or anything. More details in this forums post.

@keiko713
Copy link
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.

@keiko713
Copy link
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!

@marcelgerber
Copy link

marcelgerber commented Apr 23, 2021

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 "netlify-cli@3.21.6" with binaries:
        - ntl
        - netlify
  Done in 35.01s.

[...]

    TypeError: memoizeOne is not a function

@JGAntunes
Copy link
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
Labels
type: bug code to address defects in shipped code
Projects
None yet
10 participants