英文:
How to make netlify ignore gitignore and see all files
问题
I ignored the firebase.js file containing the Firebase data URL with gitignore.
However, as shown in the picture below, netlify showed a message saying that firebase.js could not be found.
To solve this problem, I want to give netlify permission to ignore gitignore and see all files. Could you answer me how?
npm run build
Failed to compile
Module not found: Error: Can't resolve './firebase.js' in '/opt/build/repo/src'
英文:
I ignored the firebase.js file containing the Firebase data URL with gitignore.
However, as shown in the picture below, netlify showed a message saying that firebase.js could not be found.
To solve this problem, I want to give netlify permission to ignore gitignore and see all files. Could you answer me how?
npm run build
Failed to compile
Module not found: Error: Can't resolve './firebase.js' in '/opt/build/repo/src'
答案1
得分: 2
A typical React .gitignore
would not ignore firebase.js
, especially considering that file, as shown here, is where you initialize Firebase in our application and create a database reference.
You can check that with:
cd /path/to/local/repository
git check-ignore -v -- src/firebase.js
But even if it is ignored, that should not prevent the npm build
to run.
英文:
A typical React .gitignore
would not ignore firebase.js
, especially considering that file, as shown here, is where you initialize Firebase in our application and create a database reference.
You can check that with:
cd /path/to/local/repository
git check-ignore -v -- src/firebase.js
But even if it is ignored, that should not prevent the npm build
to run.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论