Coder Social home page Coder Social logo

Unable to install 2.0.6 about react-toggle HOT 8 CLOSED

gfazioli avatar gfazioli commented on June 16, 2024
Unable to install 2.0.6

from react-toggle.

Comments (8)

aweibell avatar aweibell commented on June 16, 2024 2

Marvelous! That did it :) I currently don't use typescript, so I haven't got any warnings about it being outdated.

Thanks for your help!

from react-toggle.

gfazioli avatar gfazioli commented on June 16, 2024

@aweibell very strange! maybe is something related to your lint config, I'll try to check it soon

from react-toggle.

aweibell avatar aweibell commented on June 16, 2024

Thank you, @gfazioli. I started with an empty folder and just did

yarn init
yarn add react-toggle-components

Just tested with

npm init
npm install react-toggle-components

in an empty folder but got the same result.

I'd be happy to test other approaches if you have any ideas :)

from react-toggle.

gfazioli avatar gfazioli commented on June 16, 2024

@aweibell maybe I found the issue, it's related to type def wrong in the package.json, anyway, please, could you retry now with the latest tag 2.0.7 ?

from react-toggle.

aweibell avatar aweibell commented on June 16, 2024

Thank you. I tried both 2.0.7 and 2.0.8 but it seems to be just the same, unfortunately.

 npm install [email protected]                                                                                                                                                                    I 

> [email protected] postinstall ./node_modules/styled-components
> node ./scripts/postinstall.js || exit 0

Use styled-components at work? Consider supporting our development efforts at https://opencollective.com/styled-components

> [email protected] postinstall ./node_modules/react-toggle-component
> tsc -p tsconfig.json

src/components/Toggle/index.tsx(155,20): error TS2365: Operator '>' cannot be applied to types 'boolean' and 'string'.
src/components/Toggle/index.tsx(155,32): error TS2693: 'Props' only refers to a type, but is being used as a value here.
src/components/Toggle/index.tsx(160,12): error TS7006: Parameter 'p' implicitly has an 'any' type.
src/components/Toggle/index.tsx(161,13): error TS7006: Parameter 'p' implicitly has an 'any' type.
src/components/Toggle/index.tsx(177,16): error TS7006: Parameter 'p' implicitly has an 'any' type.
src/components/Toggle/index.tsx(178,17): error TS7006: Parameter 'p' implicitly has an 'any' type.
src/components/Toggle/index.tsx(179,27): error TS7006: Parameter 'p' implicitly has an 'any' type.
src/components/Toggle/index.tsx(181,24): error TS7006: Parameter 'p' implicitly has an 'any' type.
src/components/Toggle/index.tsx(189,26): error TS7006: Parameter 'p' implicitly has an 'any' type.
src/components/Toggle/index.tsx(192,13): error TS7006: Parameter 'p' implicitly has an 'any' type.
src/components/Toggle/index.tsx(193,15): error TS7006: Parameter 'p' implicitly has an 'any' type.
src/components/Toggle/index.tsx(196,13): error TS7006: Parameter 'p' implicitly has an 'any' type.
src/components/Toggle/index.tsx(197,15): error TS7006: Parameter 'p' implicitly has an 'any' type.
src/components/Toggle/index.tsx(199,29): error TS7006: Parameter 'p' implicitly has an 'any' type.
src/components/Toggle/index.tsx(204,17): error TS7006: Parameter 'p' implicitly has an 'any' type.
src/components/Toggle/index.tsx(211,18): error TS7006: Parameter 'p' implicitly has an 'any' type.
src/components/Toggle/index.tsx(212,19): error TS7006: Parameter 'p' implicitly has an 'any' type.
src/components/Toggle/index.tsx(213,26): error TS7006: Parameter 'p' implicitly has an 'any' type.
src/components/Toggle/index.tsx(214,29): error TS7006: Parameter 'p' implicitly has an 'any' type.
src/components/Toggle/index.tsx(217,24): error TS7006: Parameter 'p' implicitly has an 'any' type.
src/components/Toggle/index.tsx(224,29): error TS7006: Parameter 'p' implicitly has an 'any' type.
src/components/Toggle/index.tsx(231,31): error TS7006: Parameter 'p' implicitly has an 'any' type.
src/components/Toggle/index.tsx(240,22): error TS7006: Parameter 'p' implicitly has an 'any' type.
src/components/Toggle/index.tsx(241,17): error TS7006: Parameter 'p' implicitly has an 'any' type.
src/components/Toggle/index.tsx(244,31): error TS7006: Parameter 'p' implicitly has an 'any' type.
src/components/Toggle/index.tsx(251,31): error TS7006: Parameter 'p' implicitly has an 'any' type.
src/components/Toggle/index.tsx(265,29): error TS7006: Parameter 'p' implicitly has an 'any' type.
src/components/Toggle/index.tsx(272,31): error TS7006: Parameter 'p' implicitly has an 'any' type.
src/components/Toggle/index.tsx(282,33): error TS4025: Exported variable 'Toggle' has or is using private name 'Props'.
src/components/Toggle/index.tsx(316,6): error TS2604: JSX element type 'ToggleBase' does not have any construct or call signatures.
src/theme/index.tsx(15,51): error TS4025: Exported variable 'ReactToggleThemeProvider' has or is using private name 'Props'.
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `tsc -p tsconfig.json`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

from react-toggle.

gfazioli avatar gfazioli commented on June 16, 2024

@aweibell very strange, because I tried with:

$ mkdir test
$ cd test
$ yarn init
$ yarn add react-toggle-component

and everything works fine 🤔

from react-toggle.

aweibell avatar aweibell commented on June 16, 2024

Very strange indeed. Are you using other versions than me?

yarn --version
1.15.2

tsc --version
Version 2.8.3

Not sure if node is involved, but

node --version
v11.7.0

npm --version
6.9.0

from react-toggle.

gfazioli avatar gfazioli commented on June 16, 2024

😄 let's see

yarn --version
1.15.2

tsc --version
Version 3.2.4

node --version 
v12.2.0

npm --version
6.9.0

I mean, what about updating tsc and node ? let's see if they are the root cause

from react-toggle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.