TypeError: Object(...) is not a function [NOT USING WEBPACK]
See original GitHub issueGreetings I have installed React Select latest version in my Create React App. I have created a different issue because I am NOT using Webpack and still seeing this error. I am seeing this error by just importing React Select:
TypeError: Object(...) is not a function
createCache
D:/Web Development MEHUL/CovidHelp/client/node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js:254
251 | } : rulesheet(function (rule) {
252 | currentSheet.insert(rule);
253 | })];
> 254 | var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));
255 |
256 | var stylis = function stylis(styles) {
257 | return serialize(compile(styles), serializer);
This is my Component for which error is coming:
import React from "react";
import { Select } from "react-select";
import csc from "country-state-city";
import { ICountry, IState, ICity } from "country-state-city";
function Blood() {
const states = csc.getStatesOfCountry("IN");
console.log(states);
return <div></div>;
}
export default Blood;
My package.json looks like this
{
"name": "covid-help",
"version": "0.1.0",
"private": true,
"dependencies": {
"bootstrap": "^4.6.0",
"country-state-city": "^2.1.0",
"firebase": "^8.4.3",
"firebaseui": "^4.8.0",
"react": "^16.2.0",
"react-bootstrap": "^1.5.2",
"react-dom": "^16.2.0",
"react-router-dom": "^5.2.0",
"react-scripts": "1.0.17",
"react-select": "^4.3.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
},
"proxy": "http://localhost:5000",
"devDependencies": {
"autoprefixer": "^9.8.6",
"postcss": "^7.0.35",
"tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.1.2"
}
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:6
Top Results From Across the Web
webpack 4 TypeError: "Object(...) is not a function"
In regards to Object(...) is not a function , I've encountered that error using CommonJS modules with Webpack when I exported the result...
Read more >Uncaught TypeError: Object(...) is not a function | Vue Forums
Hi,. I have created a simple code using vue and syncfusion. I have successed create a simple demo using. SpreadsheetPlugin.
Read more >'TypeError: arguments[i].apply is not a function' error when ...
When working with Webpack you might come across the following error: TypeError: arguments[i].apply is not a function. So what are you doing wrong...
Read more >Uncaught TypeError: Object(...) is not a function - Web
Description When we try to load https://source.zoom.us/zoom-meeting-1.9.5.min.js error happens in console. Error Uncaught TypeError: Object( ...
Read more >How to Handle JavaScript Uncaught TypeError: “x” is Not a ...
Object Does Not Contain Function; How to Fix Javascript TypeError: "x" is not a function; Track, Analyze and Manage Errors With Rollbar.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ebonow thanks a lot. I updated everything and eventually moved to Webpack, now it works. Not sure why it did not work before.
Would you kindly also update your version of react-scripts and try again? 1.0.17 seems awfully out of date as well.