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

[2.0-beta12] Not working #642

Closed
mr47 opened this issue Jan 3, 2017 · 3 comments
Closed

[2.0-beta12] Not working #642

mr47 opened this issue Jan 3, 2017 · 3 comments

Comments

@mr47
Copy link
Contributor

mr47 commented Jan 3, 2017

I have a simple project with one page index.js using programmatic api (express)
Super simple page:

import React from 'react'
import BaseTemplate from '../components/BaseTemplate'
import MainPage from '../components/MainPage'

export default class extends React.Component {
    static async getInitialProps({ req }) {
        const isServer = !!req;
        return {
            isServer: isServer
        }
    }

    render() {
        return (
            <BaseTemplate>
                <MainPage />
            </BaseTemplate>
        )
    }
}

updated to latest version of next and always getting error:

 SyntaxError: Unexpected token m in JSON at position 0
    at Object.parse (native)
    at _callee$ (E:\projects\mr47\client\node_modules\next\dist\server\read-page.js:51:32)
    at tryCatch (E:\projects\mr47\client\node_modules\regenerator-runtime\runtime.js:64:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (E:\projects\mr47\client\node_modules\regenerator-runtime\runtime.js:355:22)
 at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (E:\projects\mr47\client\node_modules\regenerator-runtime\runtime.js:116:21)
 at step (E:\projects\mr47\client\node_modules\babel-runtime\helpers\asyncToGenerator.js:17:30)
 at E:\projects\mr47\client\node_modules\babel-runtime\helpers\asyncToGenerator.js:28:13
 at propagateAslWrapper (E:\projects\mr47\client\node_modules\async-listener\index.js:421:23)
 at E:\projects\mr47\client\node_modules\async-listener\glue.js:188:31
 at E:\projects\mr47\client\node_modules\async-listener\index.js:458:70

most part of error log ase useless but it's seems its connected to 165924b

JsonPagesPlugin making some black magic on pages.

Thanks!

@arunoda
Copy link
Contributor

arunoda commented Jan 3, 2017

Hey, could you wrap this into a small repo and send to me.
Also, tell me your OS and node version.

@arunoda
Copy link
Contributor

arunoda commented Jan 3, 2017

Actually, we did a fix for windows here: #611
It's not released yet.

@mr47
Copy link
Contributor Author

mr47 commented Jan 3, 2017

@arunoda i'll test master version in few min. Thanks!

@mr47 mr47 closed this as completed Jan 3, 2017
@lock lock bot locked as resolved and limited conversation to collaborators May 12, 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

2 participants