question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

data.map is not a function

See original GitHub issue
% npx typesync       
»  TypeSync v0.6.1
✖  data.map is not a function
Stack:
TypeError: data.map is not a function
    at xxx/node_modules/typesync/lib/type-definition-source.js:59:52
    at step (xxx/node_modules/typesync/lib/type-definition-source.js:32:23)
    at Object.next (xxx/node_modules/typesync/lib/type-definition-source.js:13:53)
    at fulfilled (xxx/node_modules/typesync/lib/type-definition-source.js:4:58)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

And my package json is

{
  "name": "zazu",
  "version": "0.6.0",
  "description": "A cross platform productivity application.",
  "scripts": {
    "prerelease": "npm install",
    "start": "cross-env NODE_ENV=development electron ./app/index.js",
    "test": "cross-env NODE_ENV=test electron-mocha ./app/index.js --recursive test/app",
    "build": "npm run build:js && cross-env npDEBUG=electron-builder ELECTRON_BUILDER_ALLOW_UNRESOLVED_DEPENDENCIES=true electron-builder --x64",
    "docs:publish": "gulp ghpages",
    "cucumber": "cucumber-js --require-module @babel/register --format node_modules/cucumber-pretty",
    "build:archlinux": "npm run build:js && cross-env DEBUG=electron-builder ELECTRON_BUILDER_ALLOW_UNRESOLVED_DEPENDENCIES=true electron-builder --x64 --linux pacman",
    "release:win": "npm run build:js && cross-env DEBUG=electron-builder ELECTRON_BUILDER_ALLOW_UNRESOLVED_DEPENDENCIES=true electron-builder --x64 --win --publish onTag",
    "release:linux": "npm run build:js && cross-env DEBUG=electron-builder ELECTRON_BUILDER_ALLOW_UNRESOLVED_DEPENDENCIES=true electron-builder --x64 --linux --publish onTag",
    "release:osx": "npm run build:js && cross-env DEBUG=electron-builder ELECTRON_BUILDER_ALLOW_UNRESOLVED_DEPENDENCIES=true electron-builder --x64 --publish onTag",
    "build:js": "concurrently \"npm run build:main\" \"npm run build:renderer\" \"npm run build:debug\"",
    "build:main": "cross-env NODE_ENV=production webpack --config ./configs/webpack.config.main.production.babel.js --colors",
    "build:renderer": "cross-env NODE_ENV=production webpack --config ./configs/webpack.config.renderer.production.babel.js --colors",
    "build:debug": "cross-env NODE_ENV=production webpack --config ./configs/webpack.config.renderer.debug.production.babel.js --colors",
    "lint": "eslint . --ext .js,.ts,.tsx",
    "lint:fix": "eslint . --ext .js,.ts,.tsx --fix",
    "format": "prettier . --write",
    "postinstall": "concurrently \"electron-builder install-app-deps\" \"typesync\""
  },
  "main": "app/dist/main.production.js",
  "husky": {
    "hooks": {
      "pre-commit": "npm run lint && pretty-quick --staged",
      "pre-push": "npm run lint && npm test"
    }
  },
  "build": {
    "productName": "Zazu",
    "appId": "com.tinytacoteam.zazu",
    "npmRebuild": false,
    "files": [
      "app",
      "package.json"
    ],
    "publish": [
      "github"
    ],
    "win": {
      "target": [
        "nsis"
      ],
      "icon": "resources/windows/icon.ico"
    },
    "nsis": {
      "oneClick": true,
      "installerHeaderIcon": "resources/windows/setup-icon.ico"
    },
    "linux": {
      "target": [
        "deb"
      ]
    },
    "mac": {
      "target": [
        "dmg"
      ],
      "icon": "resources/osx/icon.icns",
      "category": "public.app-category.productivity"
    },
    "dmg": {
      "icon": "resources/osx/dmg-icon.icns",
      "background": "resources/osx/dmg-background.png"
    },
    "directories": {
      "buildResources": "resources"
    }
  },
  "browserslist": "electron 5.0",
  "email": "zazu-app@googlegroups.com",
  "author": "Tiny Taco Team <zazu-app@googlegroups.com>",
  "homepage": "http://zazuapp.org",
  "license": "MIT",
  "repository": {
    "type": "git",
    "url": "git+ssh://git@github.com/tinytacoteam/zazu.git"
  },
  "bugs": {
    "url": "https://github.com/tinytacoteam/zazu/issues"
  },
  "dependencies": {
    "auto-launch": "^5.0.5",
    "cuid": "^2.1.8",
    "decompress": "^4.2.1",
    "fs-jetpack": "^2.2.3",
    "interweave": "^12.5.0",
    "mkdirp": "^1.0.3",
    "mousetrap": "^1.6.5",
    "nestdb": "^2.0.0",
    "node-notifier": "^6.0.0",
    "npm": "^6.14.4",
    "promise-retry": "^1.1.1",
    "prop-types": "^15.7.2",
    "react": "^16.13.1",
    "react-dom": "^16.13.1",
    "relaxed-json": "^1.0.3",
    "request": "^2.88.2",
    "semver": "^7.1.3",
    "winston": "^3.2.1",
    "winston-daily-rotate-file": "^4.4.2",
    "winston-transport": "^4.3.0"
  },
  "devDependencies": {
    "@babel/core": "^7.9.0",
    "@babel/plugin-proposal-class-properties": "^7.8.3",
    "@babel/plugin-proposal-decorators": "^7.8.3",
    "@babel/plugin-proposal-export-default-from": "^7.8.3",
    "@babel/plugin-proposal-export-namespace-from": "^7.8.3",
    "@babel/plugin-proposal-function-sent": "^7.8.3",
    "@babel/plugin-proposal-json-strings": "^7.8.3",
    "@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3",
    "@babel/plugin-proposal-numeric-separator": "^7.8.3",
    "@babel/plugin-proposal-optional-chaining": "^7.9.0",
    "@babel/plugin-proposal-private-methods": "^7.8.3",
    "@babel/plugin-proposal-throw-expressions": "^7.8.3",
    "@babel/plugin-syntax-dynamic-import": "^7.8.3",
    "@babel/plugin-syntax-import-meta": "^7.8.3",
    "@babel/plugin-transform-react-constant-elements": "^7.9.0",
    "@babel/plugin-transform-react-inline-elements": "^7.9.0",
    "@babel/preset-env": "^7.9.0",
    "@babel/preset-react": "^7.9.4",
    "@babel/preset-typescript": "^7.9.0",
    "@babel/register": "^7.9.0",
    "@babel/runtime": "^7.9.2",
    "@typescript-eslint/eslint-plugin": "^2.26.0",
    "@typescript-eslint/parser": "^2.26.0",
    "asar": "^3.0.3",
    "babel-eslint": "^10.1.0",
    "babel-loader": "^8.1.0",
    "babel-plugin-array-last-index": "0.0.5",
    "babel-plugin-closure-elimination": "^1.3.0",
    "babel-plugin-dynamic-import-node-babel-7": "^2.0.7",
    "babel-plugin-macros": "^2.8.0",
    "chai": "^4.2.0",
    "cheerio": "^1.0.0-rc.3",
    "concurrently": "^5.1.0",
    "cross-env": "^7.0.2",
    "cucumber": "^6.0.5",
    "cucumber-pretty": "^6.0.0",
    "electron": "^5.0.4",
    "electron-builder": "^22.4.1",
    "electron-mocha": "^8.0.2",
    "eslint": "^6.8.0",
    "eslint-config-prettier": "^6.10.1",
    "eslint-config-standard": "^14.1.1",
    "eslint-plugin-babel": "^5.3.0",
    "eslint-plugin-html": "^6.0.0",
    "eslint-plugin-import": "^2.20.2",
    "eslint-plugin-node": "^11.1.0",
    "eslint-plugin-promise": "4.2.1",
    "eslint-plugin-react": "^7.19.0",
    "eslint-plugin-standard": "4.0.1",
    "eslint-plugin-unicorn": "^18.0.1",
    "gh-pages": "^2.2.0",
    "gulp": "^4.0.2",
    "gulp-util": "^3.0.8",
    "husky": "^4.2.3",
    "is-travis": "^2.0.0",
    "mini-css-extract-plugin": "^0.9.0",
    "optimize-css-assets-webpack-plugin": "^5.0.3",
    "prettier": "2.0.2",
    "pretty-quick": "^2.0.1",
    "q": "^1.5.1",
    "rona": "^1.0.2",
    "sinon": "^9.0.1",
    "sinon-chai": "^3.5.0",
    "spectron": "^5.0.0",
    "terser-webpack-plugin": "^2.3.5",
    "typescript": "^3.8.3",
    "typesync": "^0.6.1",
    "webpack": "^4.42.1",
    "webpack-bundle-analyzer": "^3.6.1",
    "webpack-cli": "^3.3.11",
    "webpack-merge": "^4.2.2"
  },
  "optionalDependencies": {
    "appdmg": "^0.6.0",
    "robotjs": "^0.6.0",
    "rcedit": "^2.1.1"
  }
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jeffijoecommented, Apr 3, 2020

Is it possibly a firewall issue? I can’t reproduce at all, I’ve never seen this happen.

0reactions
jeffijoecommented, Oct 29, 2020

Adding a timeout in #59 and the ability to read the registry url from npm config was added in #57.

Read more comments on GitHub >

github_iconTop Results From Across the Web

data.map is not a function - Stack Overflow
Your answer causes the entire data object to be passed into getData , which clearly expects one of the elements from data.products as...
Read more >
TypeError: map is not a function in JavaScript | bobbyhadz
The "TypeError: map is not a function" occurs when we call the map() method on an object that is not an array. To...
Read more >
How To Fix object.map is not a function Error in JavaScript
The cause of your error is actually quite simple: the .map() method is only applicable when working with arrays. More specifically, the method ......
Read more >
TypeError: data.map is not a function in React JS - OneCompiler
data.map is not function error is happening because .map function can be applied only on lists. Make sure your response is a list....
Read more >
Solve - data.map is not a function in JavaScript - Reactgo
Solve - data.map is not a function in JavaScript ... When we use a Array.map() method on a value which is not an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found