Comments (8)
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.
@aweibell very strange! maybe is something related to your lint config, I'll try to check it soon
from react-toggle.
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.
@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.
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.
@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.
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.
😄 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)
- Can we get two-way binding for checked attribute? HOT 3
- Move styled-components as a peerDependency HOT 2
- build in 'prepare' script HOT 2
- bug? Initial value is stucked on true HOT 2
- Addition of an extra state so that it behaves as a tri state switch HOT 5
- Can't install package, using nextjs HOT 2
- Can't Install react-toggle-component "sh: 1: tsc: not found" HOT 2
- Add posibility to style the knob itself. HOT 1
- Free Trial
- free trial issue
- Epics Create from board
- Update packages
- Property 'checked' does not exist on type 'EventTarget & Element'
- react-controlled-component warning HOT 4
- multiple toggles in same app do not function independently HOT 2
- Peer dependencies React 17
- Incorrect suggested usage of component HOT 1
- Error TS1192 with TypeScript HOT 2
- Question: is TypeScript required? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-toggle.