Closed echoma closed 8 years ago
Hi @echoma,
Thanks for report. I am aware about the problem to install ubuntu. (same issue: https://github.com/y-takey/atom-mermaid/issues/9 ) Sorry, It seems to be a general problem, but have not yet resolved.
What's your node version? If your node is older, please try to upgrade. Then please run cd ~/.atom/packages/atom-mermaid; apm rebuild
. (Please replace the path of your environment)
yes, the nodejs in ubuntu15.04 is v0.10.25 which is too old. I upgraded nodejs to the lastest v4.2.1, make sure /usr/bin/node and /usr/bin/nodejs are both the latest version. and then do the "apm rebuild" as you said. But still got the same error.
Thanks for the doing. and Sorry, it seem to be not compatible with the latest nodejs. If you can easily, please try using the nodev0.12.
I hope to be successful.
I switched to node v0.12.7, still got problem, but shows different stack trace:
Failed to activate the atom-mermaid package
Module did not self-register.
Hide Stack Trace
Error: Module did not self-register.
at Error (native)
at Object.module.(anonymous function) (ATOM_SHELL_ASAR.js:137:20)
at Object.module.(anonymous function) [as .node] (ATOM_SHELL_ASAR.js:137:20)
at Module.load (module.js:353:32)
at Function.Module._load (module.js:308:12)
at Module.require (module.js:363:17)
at require (module.js:382:17)
at bindings (/home/echo/.atom/packages/atom-mermaid/node_modules/d3/node_modules/jsdom/node_modules/contextify/node_modules/bindings/bindings.js:76:44)
at Object.<anonymous> (/home/echo/.atom/packages/atom-mermaid/node_modules/d3/node_modules/jsdom/node_modules/contextify/lib/contextify.js:1:96)
at Module._compile (module.js:428:26)
at Object.defineProperty.value [as .js] (/usr/share/atom/resources/app.asar/src/compile-cache.js:169:21)
at Module.load (module.js:353:32)
at Function.Module._load (module.js:308:12)
at Module.require (module.js:363:17)
at require (module.js:382:17)
at Object.<anonymous> (/home/echo/.atom/packages/atom-mermaid/node_modules/d3/node_modules/jsdom/lib/jsdom/browser/index.js:14:21)
at Module._compile (module.js:428:26)
at Object.defineProperty.value [as .js] (/usr/share/atom/resources/app.asar/src/compile-cache.js:169:21)
at Module.load (module.js:353:32)
at Function.Module._load (module.js:308:12)
at Module.require (module.js:363:17)
at require (module.js:382:17)
at Object.<anonymous> (/home/echo/.atom/packages/atom-mermaid/node_modules/d3/node_modules/jsdom/lib/jsdom.js:11:20)
at Module._compile (module.js:428:26)
at Object.defineProperty.value [as .js] (/usr/share/atom/resources/app.asar/src/compile-cache.js:169:21)
at Module.load (module.js:353:32)
at Function.Module._load (module.js:308:12)
at Module.require (module.js:363:17)
at require (module.js:382:17)
at Object.<anonymous> (/home/echo/.atom/packages/atom-mermaid/node_modules/d3/index.js:1:78)
at Module._compile (module.js:428:26)
at Object.defineProperty.value [as .js] (/usr/share/atom/resources/app.asar/src/compile-cache.js:169:21)
at Module.load (module.js:353:32)
at Function.Module._load (module.js:308:12)
at Module.require (module.js:363:17)
at require (module.js:382:17)
at Object.<anonymous> (/home/echo/.atom/packages/atom-mermaid/lib/mermaid-view.coffee:6:25)
at Object.<anonymous> (/home/echo/.atom/packages/atom-mermaid/lib/mermaid-view.coffee:1:1)
at Module._compile (module.js:428:26)
at Object.defineProperty.value [as .coffee] (/usr/share/atom/resources/app.asar/src/compile-cache.js:169:21)
at Module.load (module.js:353:32)
at Function.Module._load (module.js:308:12)
at Module.require (module.js:363:17)
at require (module.js:382:17)
at Object.<anonymous> (/home/echo/.atom/packages/atom-mermaid/lib/atom-mermaid.coffee:2:35)
at Object.<anonymous> (/home/echo/.atom/packages/atom-mermaid/lib/atom-mermaid.coffee:1:1)
at Module._compile (module.js:428:26)
at Object.defineProperty.value [as .coffee] (/usr/share/atom/resources/app.asar/src/compile-cache.js:169:21)
at Module.load (module.js:353:32)
at Function.Module._load (module.js:308:12)
at Module.require (module.js:363:17)
at require (module.js:382:17)
at Package.module.exports.Package.requireMainModule (/usr/share/atom/resources/app.asar/src/package.js:761:34)
at Package.module.exports.Package.activateConfig (/usr/share/atom/resources/app.asar/src/package.js:263:14)
at Package.module.exports.Package.activateNow (/usr/share/atom/resources/app.asar/src/package.js:241:14)
at /usr/share/atom/resources/app.asar/src/package.js:838:25
at Emitter.module.exports.Emitter.emit (/usr/share/atom/resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:226:20)
at CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:3:61)
at CommandRegistry.module.exports.CommandRegistry.dispatch (/usr/share/atom/resources/app.asar/src/command-registry.js:145:19)
at [object Object].jQuery.fn.trigger (/usr/share/atom/resources/app.asar/src/space-pen-extensions.js:64:23)
at EventEmitter.<anonymous> (/usr/share/atom/resources/app.asar/src/window-event-handler.js:75:67)
at emitTwo (events.js:87:13)
at EventEmitter.emit (events.js:172:7)
at EventEmitter.ipc.sendSync (/usr/share/atom/resources/atom.asar/renderer/api/lib/ipc.js:21:31)
at BrowserWindow.RemoteMemberFunction [as emit] (/usr/share/atom/resources/atom.asar/renderer/api/lib/remote.js:140:29)
at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (/usr/share/atom/resources/app.asar/src/context-menu-manager.js:170:31)
at HTMLDocument.<anonymous> (/usr/share/atom/resources/app.asar/src/window-event-handler.js:157:33)
at HTMLDocument.handler (/usr/share/atom/resources/app.asar/src/space-pen-extensions.js:112:34)
at HTMLDocument.jQuery.event.dispatch (/usr/share/atom/resources/app.asar/node_modules/space-pen/vendor/jquery.js:4681:9)
at HTMLDocument.elemData.handle (/usr/share/atom/resources/app.asar/node_modules/space-pen/vendor/jquery.js:4359:46)
Thanks to try! It seems the same content in the format is different only, because nodejs version is deffrent. Try to find out so far cause is not known.
Got an error on OSX trying to activate preview as well.
[Enter steps to reproduce below:]
Atom Version: 1.0.19 System: Mac OS X 10.11 Thrown From: atom-mermaid package, v0.1.3
Failed to activate the atom-mermaid package
At /Users/ged/.atom/packages/atom-mermaid/node_modules/mermaid/src/mermaid.js:19
import * as Logger from './logger';
^^^^^^
Unexpected reserved word
/Users/ged/.atom/packages/atom-mermaid/node_modules/mermaid/src/mermaid.js:19
import * as Logger from './logger';
^^^^^^
SyntaxError: Unexpected reserved word
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:411:25)
at Object.defineProperty.value [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:169:21)
at Module.load (module.js:353:32)
at Function.Module._load (module.js:308:12)
at Module.require (module.js:363:17)
at require (module.js:382:17)
at Object.<anonymous> (/Users/ged/.atom/packages/atom-mermaid/lib/mermaid-view.coffee:8:16)
at Object.<anonymous> (/Users/ged/.atom/packages/atom-mermaid/lib/mermaid-view.coffee:1:1)
at Module._compile (module.js:428:26)
-0:02.5.0 atom-mermaid:toggle (atom-text-editor.editor.is-focused)
{
"core": {
"disabledPackages": [
"metrics",
"debugger",
"debugger",
"debugger",
"markdown-preview"
],
"useReactEditor": true
}
}
# User
Sublime-Style-Column-Selection, v1.3.0
atom-html-preview, v0.1.11
atom-mermaid, v0.1.3
autoclose-html, v0.19.0
color-picker, v2.0.13
file-icons, v1.6.11
language-apache, v1.3.0
language-diff, v0.3.1
language-dot, v1.6.0
language-vbscript, v0.6.1
markdown-preview-plus, v2.2.2
markdown-table-formatter, v2.5.4
minimap, v4.15.0
pdf-view, v0.34.0
php-debug, v0.1.3
sequence-preview, v0.1.11
# Dev
No dev packages
@echoma @jumpkick , Sorry the delay.
I updated and publish atom-mermaid package(version 0.2.0). Please update your package and try it with newer nodejs(v4.2.1) . I hope to be successful.
Worked after updating to 0.2.0. Thanks.
v0.2.0 wokrs great, thank you very much.
Thank you very much. closed #10
Got an error on windows trying to activate preview as well.
[Enter steps to reproduce below:]
open a markdown document which includes mermaid diagrams select "Toggle Preview" in the menu bar Atom Version: 1.40.1 x64 System: win10 x64 Thrown From: atom-mermaid package, v3.3.2
C:\Users\xxxx.atom\packages\atom-mermaid\node_modules\dagre-d3-renderer\lib\label\add-html-label.js:1
(function (exports, require, module, filename, dirname, process, global, Buffer) { return function (exports, require, module, filename, dirname) { import util from '../util'
^^^^
SyntaxError: Unexpected identifier
at new Script (vm.js:74:7)
at NativeCompileCache.runInThisContext (C:\Users\xxxx\AppData\Local\atom\app-1.40.1\resources\app\static\
[Enter steps to reproduce below:]
Atom Version: 1.0.19 System: Ubuntu 15.04 Thrown From: atom-mermaid package, v0.1.3
Stack Trace
Failed to activate the atom-mermaid package
Commands
Config
Installed Packages