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

node-chartist not working well with webpack (azure-functions-pack) #19

Open
danielserrao opened this issue Nov 2, 2017 · 0 comments
Open

Comments

@danielserrao
Copy link

danielserrao commented Nov 2, 2017

Hi,

I made an Azure Function micro service using Node.js and I'm using node-chartist to generate graphs. Locally is working fine, but when deploying to development environment, it is executed a script that executes azure-functions-pack and generate a bundle with the service code and all the required npm modules and it seems that for some reason the function generate changes from function to an empty object. In my code I have this:

generate = require('node-chartist')
...
return generate('line', options, data).then((string)=>{
...
});

When using node-chartist I get on the first request the following error in my azure logs:

System.Exception : Error: Cannot find module "."
at webpackMissingModule

Locally if I make console.log(typeof generate); I have a function, but if I do the same in development I get an empty object {}.

My node-chartist version is 3.10.10. Thanks for any help.

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

1 participant