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

async listUrls() error on build / serve #4

Open
bmx269 opened this issue Nov 21, 2017 · 4 comments
Open

async listUrls() error on build / serve #4

bmx269 opened this issue Nov 21, 2017 · 4 comments

Comments

@bmx269
Copy link

bmx269 commented Nov 21, 2017

Prember is throwing an error on PREMBER=true ember serve or build:

Unexpected identifier
/node_modules/prember/lib/prerender.js:22
  async listUrls() {
        ^^^^^^^^

SyntaxError: Unexpected identifier
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:542:28)
    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)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Class.postprocessTree (/node_modules/prember/index.js:16:21)

Here are the contents of the ember-cli-build.js:

/* eslint-env node */
'use strict'

const EmberApp = require('ember-cli/lib/broccoli/ember-app');

module.exports = function(defaults) {
  let app = new EmberApp(defaults, {
    'ember-font-awesome': {
      useScss: true, // for ember-cli-sass
    },
    prember: {
      urls: [
        '/',
        '/consulting',
        '/development',
        '/support',
        '/work',
        '/about',
        '/contact',
      ]
    }
  });
  return app.toTree();
};
@ef4
Copy link
Owner

ef4 commented Nov 21, 2017

Ah, looks like you are on an older Node version. I would recommend the current Node LTS release, which is 8.x.

(Some ember-cli versions may show a warning on that node version, but it's just paranoia, they work fine.)

@bmx269
Copy link
Author

bmx269 commented Nov 21, 2017

That was the issue. Thanks

@ef4
Copy link
Owner

ef4 commented Nov 21, 2017

We should probably document. I don't think it should be too weird to require node 8, but lots of stuff in ember-cli land lags a bit on its recommendations.

@sandstrom
Copy link
Contributor

@bmx269 I'm doing some issue gardening 🌱🌿 🌷 and came upon this issue. Since it's quite old I just wanted to ask if this is still relevant? If it isn't, maybe we can close this issue?

By closing some old issues we reduce the list of open issues to a more manageable set.

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