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

SyntaxError: Unexpected token { #451

Closed
archy-bold opened this issue Jun 11, 2020 · 6 comments
Closed

SyntaxError: Unexpected token { #451

archy-bold opened this issue Jun 11, 2020 · 6 comments

Comments

@archy-bold
Copy link

/home/simon/Development/selectfashion/node_modules/fs-extra/lib/mkdirs/make-dir.js:85
} catch {
^

SyntaxError: Unexpected token {
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object. (/home/simon/Development/selectfashion/node_modules/fs-extra/lib/mkdirs/index.js:3:44)

I'm trying to run the latest version (2.0.0-26) and getting the above error. According to this issue on another repo (vercel/pkg#883), it's related to the latest version of fs-extra and it should be downgraded to 8.1.0.

bezoerb pushed a commit that referenced this issue Jun 11, 2020
bezoerb added a commit that referenced this issue Jun 11, 2020
@bezoerb
Copy link
Collaborator

bezoerb commented Jun 11, 2020

@archy-bold: I've removed the fs-extra dependency in v2.0.0-27. Could you try again?

@archy-bold
Copy link
Author

That fixed that particular issue, but now I'm seeing the following error in asset-resolver. Is that something to do with my version of node?

/home/simon/Development/selectfashion/node_modules/asset-resolver/node_modules/got/dist/source/create.js:133
    const paginateEach = (async function* (url, options) {
                                        ^

SyntaxError: Unexpected token *
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:616:28)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/simon/Development/selectfashion/node_modules/asset-resolver/node_modules/got/dist/source/index.js:7:18)

@bezoerb
Copy link
Collaborator

bezoerb commented Jun 13, 2020

Which version of node are you using?

@archy-bold
Copy link
Author

Node version is 8.10.0

@bezoerb
Copy link
Collaborator

bezoerb commented Jun 15, 2020

This is strange... you should not be able to install critical@next with this version of node:
https://github.com/addyosmani/critical/blob/master/package.json#L26

@archy-bold
Copy link
Author

I upgraded to node 12 and all is good now. Odd I didn't even get a warning.

@bezoerb bezoerb closed this as completed Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants