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

not working #1

Closed
MooersLab opened this issue Feb 18, 2018 · 4 comments
Closed

not working #1

MooersLab opened this issue Feb 18, 2018 · 4 comments

Comments

@MooersLab
Copy link

I am using MacOSX 13 High Sierra.
I updated Node.js and installed atom2yasnippets.
I can print the help but that is it.

I have tried the following commands

atom2yas -u "file:///Users/blaine/software/yasnippets/subi.cson" -o ./dist

atom2yas -u file:///Users/blaine/software/yasnippets/subi.cson-o file///Users/blaine/software/yasnippets/dist/

atom2yas -u /Users/blaine/software/yasnippets/subi.cson -o /Users/blaine/software/yasnippets/dist

atom2yas -u rawCSONAtomSnippetURL -o ./dist

All of the above give the error message:

(node:40501) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: only absolute urls are supported

Here is the content of the cson file:

'.text.tex, latex.ing, comment.line.percentage.tex, meta.no-spellcheck':
'subsection with label and index':
prefix: 'subi'
body: '''
\subsection{${1:subsection name}} % (fold)
\label{sub:${1:subsection name}}
\index{${1:subsection name}}
${2:Start here}
% subsection ${1:subsection name} (end)$0
'''

@liyaodong
Copy link
Owner

Hi @MooersLab

It's time to try atom2yas -u https://raw.githubusercontent.com/bryceosterhaus/atom-jest-snippets/master/snippets/custom.json -o ./dist on your local. the command only support the cson url on remote http/https server. maybe you can upload your local cson file to gist and get a raw content url. I will update the readme file to clarify this.

Thanks

@MooersLab
Copy link
Author

MooersLab commented Feb 22, 2018 via email

@cloudnine
Copy link

Hi,
I am using windows 10 wsl
I updated Node.js, npm, and installed atom2yasnippets.

atom2yas -u https://github.com/dsandstrom/atom-css-snippets/blob/master/snippets/css-snippets.cson -o ./dist

It works, and runs anyway the index.js but maybe has problems parsing the source?

erron when parse  https://github.com/dsandstrom/atom-css-snippets/blob/master/snippets/css-snippets.cson  as CSON file
(node:2329) UnhandledPromiseRejectionWarning: Error: [stdin]:31:96: error: missing / (unclosed regex)
  <title>atom-css-snippets/css-snippets.cson at master · dsandstrom/atom-css-snippets · GitHub</title>
                                                                                               ^
    at parseCSON (/usr/local/lib/node_modules/atom2yasnippets/index.js:32:15)
    at <anonymous>:null:null
    at process._tickCallback (internal/process/next_tick.js:188:7)

(node:2329) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2329) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Any suggestions?

@cloudnine
Copy link

Same result with another source.

erron "GitHub</title>" .

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