Skip to content
New issue

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

"Cannot find module" deploying to Heroku #675

Closed
pessato opened this issue Jan 6, 2017 · 2 comments
Closed

"Cannot find module" deploying to Heroku #675

pessato opened this issue Jan 6, 2017 · 2 comments

Comments

@pessato
Copy link

pessato commented Jan 6, 2017

Running npm run install and npm run start --p 3000 locally works no issues using same version of node.
Once deployed using the package.json below I'm receiving errors as in the Heroku Logs below.
Big thanks for all the effort being put into this project.

package.json

{
  "name": "xxx",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "engines": {
    "node": "6.9.1"
  },
  "dependencies": {
    "glamor": "2.20.20",
    "google-map-react": "0.22.0",
    "google-maps-react": "1.0.19",
    "isomorphic-fetch": "2.2.1",
    "lodash.range": "3.2.0",
    "next": "2.0.0-beta.15",
    "numeral": "2.0.3",
    "react-bootstrap": "0.30.6",
    "react-google-maps": "6.0.1",
    "react-inlinesvg": "0.5.4",
    "react-input-range": "0.9.3",
    "react-redux": "4.4.5",
    "react-select": "1.0.0-rc.2",
    "react-slick": "0.14.5",
    "react-svg-pan-zoom": "2.2.2",
    "redux": "3.6.0",
    "redux-form": "6.2.1",
    "redux-thunk": "2.1.0"
  },
  "devDependencies": {
    "browser-sync": "2.18.2",
    "bootstrap-sass": "3.3.7",
    "gulp": "3.9.1",
    "gulp-sass": "2.3.2"
  },
  "scripts": {
    "dev": "next",
    "install": "next build",
    "start": "next start -p ${PORT}"
  }
}

Heroku Logs

{ Error: Cannot find module '/tmp/build_64ddcd154cf30721ff7251c45faf0a03/node_modules/next/dist/server/document.js'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/app/.next/dist/pages/_document.js:3:18)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3) code: 'MODULE_NOT_FOUND' }
{ Error: Cannot find module '/tmp/build_64ddcd154cf30721ff7251c45faf0a03/node_modules/babel-runtime/core-js/object/get-prototype-of'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/app/.next/dist/pages/_error.js:7:23)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3) code: 'MODULE_NOT_FOUND' }
@nkzawa
Copy link
Contributor

nkzawa commented Jan 6, 2017

Duplicate of #198

@pessato pessato closed this as completed Jan 6, 2017
@flieks
Copy link

flieks commented Aug 31, 2017

@pessato i see you are using react-slick with nextJS . How did you get this to work ?
akiran/react-slick#842

@lock lock bot locked as resolved and limited conversation to collaborators May 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants