1

I'm trying to deploy a project with firebase using: npm --prefix $RESOURCE_DIR run lint

At first, this gave me a list of errors, which I found to be similar here: Error deploying with firebase on npm --prefix $RESOURCE_DIR run lint

and then tried to update my firebase.json with the command mentioned in the approved answer there and tried to deploy it again. Now I've read on the internet that this takes time, but it has been half an hour now, and this command is still being run.

Any idea how I can get around this?

EDIT: The steps I followed after creating a new directory, FriendlyChatFunctions, I did the following in the order written:
1. firebase init functions
2. checked 'yes' to proceed
3. checked 'JavaScript' for the language to be used
4. checked 'yes' to use ESlint to catch probable bugs
5. edited index.js and saved the file 6. ran the command firebase deploy

Nompumelelo
  • 929
  • 3
  • 17
  • 28
  • Half an hour is a pretty long time, *unless* you have a large project. Four questions: What shell are you using? Are you on Windows? What does `npm run lint` do (aka, what command is it running)? How big is your project on a scale of "todo list" to "literally recreated facebook"? – Sidney Jan 19 '18 at 22:34
  • That command your showing doesn't deploy code. It just runs ESLint against your code. That should run very quickly. – Doug Stevenson Jan 19 '18 at 22:38
  • It's not big at all, I've been following this course: https://classroom.udacity.com/courses/ud0352 the entire time. and `npm run lint` has something to do with ESlint since I chose it to be added for catching any probable bugs. – mystic girl 101 Jan 19 '18 at 22:38
  • That link is making me log in, so I can't see exactly what you're doing. Could you edit this issue to include exactly the steps you're taking (from a fresh firebase init) that leads up to the delay you're seeing? – Doug Stevenson Jan 19 '18 at 22:40
  • @DougStevenson, I don't understand, but it's honestly taking ages to run. Any suggestions? :/ – mystic girl 101 Jan 19 '18 at 22:46
  • Please edit this issue as I've asked in my prior comment. – Doug Stevenson Jan 19 '18 at 22:50
  • @DougStevenson, done. – mystic girl 101 Jan 19 '18 at 23:00
  • Please also show the contents of your index.js, so we know what it's trying to deploy. – Doug Stevenson Jan 19 '18 at 23:07
  • Possible duplicate of [Error deploying with firebase on npm --prefix $RESOURCE\_DIR run lint](https://stackoverflow.com/questions/48345315/error-deploying-with-firebase-on-npm-prefix-resource-dir-run-lint) – Inzamam Malik Feb 06 '18 at 12:38

1 Answers1

4

in file

firebase.json

Change $RESOURCE_DIR --> %RESOURCE_DIR%. It's worked for me

Phú Dnp
  • 114
  • 7
  • Perfect! This is the only solution that worked for me after I moved firebase.json into the root of the project from a parent folder. – Vixxd Mar 01 '22 at 22:04