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 deploy nextjs #1683

Closed
kexhest opened this issue Nov 21, 2018 · 3 comments
Closed

Cannot deploy nextjs #1683

kexhest opened this issue Nov 21, 2018 · 3 comments

Comments

@kexhest
Copy link

kexhest commented Nov 21, 2018

Hi!

Thanks for all the awesome work on next and now. Really loving the experience.

But I have a problem, just tried to deploy a next app and after several tries I just get Unable to import module 'now__launcher': Error in the build logs and the app responds with 502: An error occurred with your deployment. When I read into the logs it appears as if it tries to load an undefined version of next through the parsing of my package.json.

from the logs:

{ name: 'rps',
  version: '1.0.0',
  description: '',
  scripts: 
   { test: 'echo "Error: no test specified" && exit 1',
     dev: 'next',
     build: 'next build',
     start: 'next start',
     'now-build': 'next build' },
  license: 'MIT',
  dependencies: 
   { react: '^16.7.0-alpha.2',
     'react-dom': '^16.7.0-alpha.2',
     '@zeit/next-css': '^1.0.1',
     next: undefined,
     'prop-types': '^15.6.2',
     'react-spring': '^6.1.8',
     'next-server': 'canary' },
  devDependencies: { next: 'canary', 'next-server': undefined } }

my package.json

{
  "name": "rps",
  "version": "1.0.0",
  "description": "",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "dev": "next",
    "build": "next build",
    "start": "next start"
  },
  "license": "MIT",
  "dependencies": {
    "@zeit/next-css": "^1.0.1",
    "next": "^7.0.2-canary.26",
    "prop-types": "^15.6.2",
    "react": "^16.7.0-alpha.2",
    "react-dom": "^16.7.0-alpha.2",
    "react-spring": "^6.1.8"
  }
}

I only have one page (index.js) as this is just a test and everything works locally, here's my now.json:

{
  "version": 2,
  "name": "rps",
  "builds": [{ "src": "next.config.js", "use": "@now/next" }]
}

Any idea of where I might be doing something wrong? Tried searching for an answer to similar problems but couldn't find anything.

@kexhest
Copy link
Author

kexhest commented Nov 21, 2018

It appears removing @zeit/next-css and going for https://www.npmjs.com/package/styled-jsx resolved the issue. Closing.

@kexhest kexhest closed this as completed Nov 21, 2018
@jesstelford
Copy link

An alternative is to only run the @zeit/next-css during a build phase: vercel/next.js#5750 (comment)

@balupton
Copy link

Worth noting, that considering this issue, the documentation here is incorrect then:
https://www.npmjs.com/package/@zeit/next-typescript

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants