hydrogen: Uncaught SyntaxError: Invalid or unexpected token

Steps to Reproduce

  1. Install Hydrogen from Atom

Atom: 1.42.0 x64 Electron: 4.2.7 OS: Microsoft Windows 10 Home Thrown From: Hydrogen package 2.13.1

Stack Trace

Uncaught SyntaxError: Invalid or unexpected token

At C:\Users\Tom\AppData\Local\atom\app-1.42.0\resources\app\static\<embedded>:11

C:\Users\Tom\.atom\packages\Hydrogen\node_modules\github-markdown-css\github-markdown.css:1
(function (exports, require, module, __filename, __dirname, process, global, Buffer) { return function (exports, require, module, __filename, __dirname) { @font-face {
                                                                                                                                                           ^

SyntaxError: Invalid or unexpected token
    at new Script (vm.js:79:7)
    at NativeCompileCache.runInThisContext (~/AppData/Local/atom/app-1.42.0/resources/app/static/<embedded>:11:146322)
    at Module.get_Module._compile (~/AppData/Local/atom/app-1.42.0/resources/app/static/<embedded>:11:147206)
    at Object.value [as .js] (~/AppData/Local/atom/app-1.42.0/resources/app/static/<embedded>:11:150977)
    at Module.load (internal/modules/cjs/loader.js:602:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
    at Function.Module._load (internal/modules/cjs/loader.js:533:3)
    at Module.require (/app.asar/static/index.js:72:46)
    at require (~/AppData/Local/atom/app-1.42.0/resources/app/static/<embedded>:11:146745)
    at /packages/Hydrogen/node_modules/@nteract/markdown/lib/markdown-render.js:18:1)
    at /packages/Hydrogen/node_modules/@nteract/markdown/lib/markdown-render.js:31:3)
    at Module.get_Module._compile (~/AppData/Local/atom/app-1.42.0/resources/app/static/<embedded>:11:147429)
    at Object.value [as .js] (~/AppData/Local/atom/app-1.42.0/resources/app/static/<embedded>:11:150977)
    at Module.load (internal/modules/cjs/loader.js:602:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
    at Function.Module._load (internal/modules/cjs/loader.js:533:3)
    at Module.require (/app.asar/static/index.js:72:46)
    at require (~/AppData/Local/atom/app-1.42.0/resources/app/static/<embedded>:11:146745)
    at /packages/Hydrogen/node_modules/@nteract/markdown/lib/index.js:6:43)
    at /packages/Hydrogen/node_modules/@nteract/markdown/lib/index.js:11:3)
    at Module.get_Module._compile (~/AppData/Local/atom/app-1.42.0/resources/app/static/<embedded>:11:147429)
    at Object.value [as .js] (~/AppData/Local/atom/app-1.42.0/resources/app/static/<embedded>:11:150977)
    at Module.load (internal/modules/cjs/loader.js:602:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
    at Function.Module._load (internal/modules/cjs/loader.js:533:3)
    at Module.require (/app.asar/static/index.js:72:46)
    at require (~/AppData/Local/atom/app-1.42.0/resources/app/static/<embedded>:11:146745)
    at /packages/Hydrogen/node_modules/@nteract/outputs/lib/components/media/markdown.js:13:36)
    at /packages/Hydrogen/node_modules/@nteract/outputs/lib/components/media/markdown.js:27:3)
    at Module.get_Module._compile (~/AppData/Local/atom/app-1.42.0/resources/app/static/<embedded>:11:147429)

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 4
  • Comments: 15 (4 by maintainers)

Most upvoted comments

I am hydrogen’s maintainer and know most everything about the code base. Ever since v2.9 ironically the update I joined hydrogen, we use a more up to date package that is meant for a webpack context (which hydrogen is not). Because of this published versions of our dependencies can have errors that I have to deal with outside of hydrogen, but they require lots of work and or time which is why we specifically revert to v2.8 and why it takes so long to solve the issues.

Everyone will face this issue regardless of OS or kernel, so I have locked this for now (please also thumbs up issues in the future if you see them and do not have a new/useful info to add to the discussion). Thank you for reporting. Please temporarily use hydrogen 2.8.0 while I fix this install issue.

apm install hydrogen@2.8.0

Same issue here

@quertytam It has to do with your python path. Most of the time this is directly pulled from your system/user environment variable PYTHONPATH most likely you could change that 38 to a 37 as that is probably the correct directory, but it really just depends on how you installed python as there are a million different ways. But poython does have docs about the pythonpath var.