2

I've built a small app and am trying to deploy it to Heroku, but I keep getting this error: Cannot resolve dependency '@emotion/is-prop-valid'. I'm not using create-react-app for this project.

The full message is: 🚨 /tmp/build_7241c20b1c425be31049d4add81a048a/node_modules/react-pose/lib/index.js:10:42: Cannot resolve dependency '@emotion/is-prop-valid'

The package.json file looks like this:

{
  "name": "name",
  "version": "2.0.0",
  "description": "description",
  "engines": {
    "npm": "6.0.0",
    "node": "10.9.0"
  },
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "format": "prettier --write \"src/**/*.{js,jsx,css,json}\"",
    "format:check": "prettier --list-different \" src/**/*.{js,jsx,css,json}\"",
    "lint": "eslint \" eslint src/**/*,{js,jsx}\"",
    "dev": "parcel src/index.html",
    "start": "serve -s build",
    "build": "parcel build src/index.html",
    "heroku-postbuild": "parcel build src/index.html"
  },
  "repository": {
    "type": "git",
    "url": "url"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "@babel/core": "^7.0.0",
    "@babel/plugin-proposal-class-properties": "^7.0.0",
    "@babel/preset-env": "^7.0.0",
    "@babel/preset-react": "^7.0.0",
    "babel-eslint": "^10.0.1",
    "eslint": "^5.6.1",
    "eslint-config-prettier": "^3.1.0",
    "eslint-plugin-import": "^2.14.0",
    "eslint-plugin-jsx-a11y": "^6.1.1",
    "eslint-plugin-prettier": "^2.7.0",
    "eslint-plugin-react": "^7.11.1",
    "parcel-bundler": "^1.10.1",
    "prettier": "^1.14.3"
  },
  "dependencies": {
    "@reach/router": "^1.2.1",
    "axios": "^0.18.0",
    "prop-types": "^15.6.2",
    "react": "^16.5.2",
    "react-dom": "^16.5.2",
    "react-pose": "^3.3.6",
    "react-spring": "^5.9.0",
    "serve": "^10.0.2"
  }
}

I've looked around, but I can't find anyone else that's getting this sort of error. My theory is that react-pose is dependent upon that emotion module, but I don't know how to make Heroku download it.

Any help would be appreciated, Thanks!

1 Answer 1

1

try this:

{
  "name": "name",
  "version": "2.0.0",
  "description": "description",
  "engines": {
    "npm": "6.0.0",
    "node": "10.9.0"
  },
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "format": "prettier --write \"src/**/*.{js,jsx,css,json}\"",
    "format:check": "prettier --list-different \" src/**/*.{js,jsx,css,json}\"",
    "lint": "eslint \" eslint src/**/*,{js,jsx}\"",
    "dev": "parcel src/index.html",
    "start": "./node_modules/parcel-bundler/bin/cli.js src/index.html",
    "build": "parcel build src/index.html",
    "heroku-postbuild": "parcel build src/index.html"
  },
  "repository": {
    "type": "git",
    "url": "url"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "@babel/core": "^7.0.0",
    "@babel/plugin-proposal-class-properties": "^7.0.0",
    "@babel/preset-env": "^7.0.0",
    "@babel/preset-react": "^7.0.0",
    "babel-eslint": "^10.0.1",
    "eslint": "^5.6.1",
    "eslint-config-prettier": "^3.1.0",
    "eslint-plugin-import": "^2.14.0",
    "eslint-plugin-jsx-a11y": "^6.1.1",
    "eslint-plugin-prettier": "^2.7.0",
    "eslint-plugin-react": "^7.11.1",
    "parcel-bundler": "^1.10.1",
    "prettier": "^1.14.3"
  },
  "dependencies": {
    "@reach/router": "^1.2.1",
    "axios": "^0.18.0",
    "prop-types": "^15.6.2",
    "react": "^16.5.2",
    "react-dom": "^16.5.2",
    "react-pose": "^3.3.6",
    "react-spring": "^5.9.0",
    "serve": "^10.0.2"
  }
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.