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

Error: No parser found for extension ".json" #61

Closed
mikesprague opened this issue May 12, 2017 · 14 comments
Closed

Error: No parser found for extension ".json" #61

mikesprague opened this issue May 12, 2017 · 14 comments

Comments

@mikesprague
Copy link

Error produced on two computers with the following operating systems:

  • MacOS Sierra (w/ latest updates)
  • Ubuntu 16.04

Each computer has the same version of Node/npm/lib.cli installed:

  • lib.cli v3.0.0-rc9
  • Node v7.10.0
  • npm v4.6.1

Details

  • I gave the tutorial on the Medium Slack Platform Blog (Build a “Serverless” Slack Bot in 9 Minutes with Node.js and StdLib) a try.
  • I was able to get as far as Minute 5: StdLib Service Creation when I ran into the error.
    • Running lib create -t slack worked as expected.
    • However, inside my slack-app directory, running
      lib .commands --command /hello --text hey there --channel general
      produced the error Error: No parser found for extension ".json".
  • Identical error on both operating systems.
@marc-se
Copy link

marc-se commented May 13, 2017

Can confirm this error, running node v6.9.5 on MacOS Sierra (w/ latest updates)

@keithwhor
Copy link
Contributor

This should fix the issue right now;

Add: "build": "legacy" under the "stdlib" field in package.json.

LMK if you still have trouble. We're pushing a new release by Monday and a release candidate was accidentally published to NPM. (Hence 3.0.0-rc9 for your version.) I thought I tore it down but apparently it's still running as the latest version.

@marc-se
Copy link

marc-se commented May 13, 2017

Thanks for your fast reply @keithwhor - it doesn't work for me, but don't worry, I'll wait till the monday release arrives 👍🏼

@mikesprague
Copy link
Author

That did it! Looking forward to finishing that tutorial and then digging further into stdlib. Thanks!

@mikesprague
Copy link
Author

@marc-se I know this is stating the obvious, but just in case (since the suggested fix worked for me), if you have the following "build": "faaslang", in your package.json under the "stdlib" field, you should change faaslang to legacy - versus adding an additional entry.

@keithwhor
Copy link
Contributor

@marc-se and @mikesprague --- Update lib.cli to 3.0.1 (or newer) and follow the updated instructions on the Medium article.

Should work A-OK now :).

@prodrammer
Copy link

I'm getting this when attempting to 'lib http' the vue template example at:

https://docs.stdlib.com/main/#/templates/vue

I'm running:

  • node 6.10.3
  • npm 3.10.10
  • lib 3.0.2
  • macOS Sierra 10.12.2

If I change the build setting in package.json from "faaslang" to "legacy", 'lib http' works.

@keithwhor: Is the release pushed? Is faaslang supported?

@jacoblee93
Copy link
Contributor

@ryanhaney We'll be pushing an updated version of the Vue template to support faaslang very soon. We're in the process of phasing out all of our legacy templates. We will let you know when it's ready!

@prodrammer
Copy link

@jacoblee93:

I assume the templates that will be updated are located at https://github.com/stdlib/utils.templates.

If so, I can watch that repo. Please confirm. Thanks!

@jacoblee93
Copy link
Contributor

Yessir. It should be soon -- the code is ready, we're just combing through it again.

@aggierunner
Copy link

I'm having this issue now too, but changing build to legacy as suggested above, fixes the json parser error.

Although that fixes the json error, I'm getting a new error when I try to test the function (lib . HelloWorld) Error: Cannot find module '/path/stdlib/myID/alexa/functions/index.js'

Any suggestions? It looks like index.js is inside a main folder, but something is expecting it to be in the functions directory...

Versions:

  • lib: 3.0.3
  • nodejs: 6.11.0
  • npm: 3.10.10

@jacoblee93
Copy link
Contributor

@aggierunner We updated our Vue template to work with FaaSlang, but we still have to update our Alexa template.

Is there a file called main.js in your myID/alexa/functions directory? If there is, renaming that to index.js and removing the context argument from the function may work for a legacy build.

@blondesalad87
Copy link

@jacoblee93 does the change for the Vue template apply to the Slack template as well?

@jacoblee93
Copy link
Contributor

@blondesalad87 yes, it should all work fine now. Let's continue the conversation on the other issue that you opened!

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

7 participants