We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm trying to write a react app and i installed jasonp via npm install jasonp. My code
npm install jasonp
import React, {Component} from 'react'; import { AutoComplete } from 'material-ui'; import getMuiTheme from 'material-ui/styles/getMuiTheme'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; import JSONP from 'jsonp'; const googleAutoSuggestURL = ` //suggestqueries.google.com/complete/search?client=youtube&ds=yt&q=`; class MaterialUIAutoComplete extends Component { constructor(props) { super(props); this.onUpdateInput = this.onUpdateInput.bind(this); this.state = { dataSource : ['Test', 'Test2'], inputValue : '' } } onUpdateInput(inputValue) { const self = this; this.setState({ inputValue: inputValue }, function() { self.performSearch(); }); } performSearch() { const self = this, url = googleAutoSuggestURL + this.state.inputValue; if(this.state.inputValue !== '') { JSONP(url, function(error, data) { // handle results here }); } } render() { return <MuiThemeProvider muiTheme={getMuiTheme()}> <AutoComplete dataSource = {this.state.dataSource} onUpdateInput = {this.onUpdateInput} /> </MuiThemeProvider> } } export default MaterialUIAutoComplete;
After executing it i get the error
Failed to compile. Error in ./src/App.js Module not found: 'jsonp' in /Users/dave/Programming/Web/cenote/src @ ./src/App.js 24:13-29
It is installed in cenote/node_modules/jasonp. Any idea why i get this error?
cenote/node_modules/jasonp
The text was updated successfully, but these errors were encountered:
jasonp is a different module: https://www.npmjs.com/package/jasonp
jasonp
Sorry, something went wrong.
No branches or pull requests
I'm trying to write a react app and i installed jasonp via
npm install jasonp
. My codeAfter executing it i get the error
It is installed in
cenote/node_modules/jasonp
. Any idea why i get this error?The text was updated successfully, but these errors were encountered: