Open Amruta-Ranade opened 5 years ago
Hi Amruta, Sorry for the late reply. What version of the NPM package do you have installed? I think the latest one is 1.3.0, but it works fine for me.
Are you getting any console errors in the browser or in the terminal when you're running it?
@Amruta-Ranade - any luck?
Hi Matt,
Sorry, I completely missed your earlier message. I am traveling this month with sub-par access to the internet. Will be back in the US this weekend. Will try out your suggestion and get back to you. Sorry again!
On Fri, Jan 25, 2019, 5:57 AM Matt Cheah notifications@github.com wrote:
@Amruta-Ranade https://github.com/Amruta-Ranade - any luck?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mattcheah/cover-letter-snippets/issues/12#issuecomment-457409981, or mute the thread https://github.com/notifications/unsubscribe-auth/AK87cjXNFB7ZLWJagO1UoLz4IZqCAPlXks5vGk-DgaJpZM4ZzFA6 .
Hey..I am back at my laptop. I was prompted to upgrade npm to 6.7.0, so I did that. But now I am running into a new error:
body-parser deprecated undefined extended: provide extended option ../../usr/local/lib/node_modules/cover-letter-snippets/index.js:16:17 snippets starting, listening on: localhost:3141 events.js:160 throw er; // Unhandled 'error' event ^
Error: listen EADDRINUSE :::3141
at Object.exports._errnoException (util.js:1018:11)
at exports._exceptionWithHostPort (util.js:1041:20)
at Server._listen2 (net.js:1258:14)
at listen (net.js:1294:10)
at Server.listen (net.js:1390:5)
at EventEmitter.listen (/usr/local/lib/node_modules/cover-letter-snippets/node_modules/express/lib/application.js:618:24)
at Object.
Oh..never mind..got it working now. Still can't connect to the JSON server though :( Here's what I am doing:
npm i -g cover-letter-snippets
snippets
I am running npm version 6.7.0
hey @Amruta-Ranade, I'm looking into this but I'm not sure whats going on. In the meantime, can you do a few things for me?
Just make sure everything is updated (npm update
)
Check that your package is installed globally.
Check if everything else works when using MongoDB instead of a JSON file. (I noticed you already added some snippets to the test one - remember to remove them if you don't want everyone else to see your info)
If you still can't get it working, find the folder where you installed cover-letter-snippets (mine is at C:\Users\[my_user]\AppData\Roaming\npm\node_modules\cover-letter-snippets
on windows) and comment out line 16 (app.use(express.urlencoded());
) I don't remember why I put that in there but it seems to work for me if I take it out. Then save, run snippets
again and let me know if it works?
Thanks!
Hey! I did everything you mentioned. The MongoDB part works fine. Still can't get the JSON part to work. (JFYI: This isn't a blocker. I can still complete my video project using the MongoDB option. Just trying to debug this out of curiosity. If it's taking up too much of your time, you can just let it be.)
I tried commenting out the line, but then got this error: env: node\r: No such file or directory
Oh..the error I am getting is "Called GetSnippets! File already exists". Can you share the path where the JSOn file is stored? I can try deleting it and running snippets again.
Ah! Got it to work! The jsonFilePath
parameter was blank in json-routes.js. Added a value "file.js" for the parameter and it works fine :)
Before:
jsonFilePath: ""
After:
jsonFilePath: "file.js"
I tried to use the Connect to JSON file functionality, but on clicking the button, nothing happens. I think this is a recent bug, because I remember being able to use the functionality when I first tried the app back in October.