Module not found: Error: Can't resolve 'react-bootstrap/card' in '/tmp/build_3c0b8276/src/components/card' - heroku

I've been trying to deploy my frontend portion of my fullstack app onto Heroku (linking it to the beckend also on Heroku) but I keep getting the same error. any thoughts? follows the message below and a print of the error... Any help is much appreciated!
Module not found: Error: Can't resolve 'react-bootstrap/card' in '/tmp/build_3c0b8276/src/components/card'
Thanks,
Danilo
I've tried everything that I've found on StackFlow and other internet sources and nothing seems to work... Change bootstrap versions, reinstall, check node versions, removing package-lock and so on...

Related

sphinx autofunction works fine on local but not on server

The autofunction works perfectly on my local machine but on server it does not show anything. I check the log and find the following thing,
WARNING: autodoc: failed to import function blablabla; the following exception was raised: No module named 'numpy'.
I suppose installing packages is not a must on sphinx. I only need sphinx to read my docstring and generate documentation.
Well, after several hours of investigation I am able to answer my question. Using autodoc_mock_imports does the trick.

Selenium WebDriverException: Reached error page

I am following a Django TDD tutorial at:
http://www.marinamele.com/taskbuster-django-tutorial/taskbuster-working-environment-and-start-django-project
I get the following error when running 'all_users.py' before and after I start the development server 'python manage.py runserver':
Traceback (most recent call last):
File "functional_tests/all_users.py", line 15, in test_it_worked
self.browser.get('http://localhost:8000')
File "/Users/samgao/.virtualenvs/tb_test/lib/python3.6/site->packages/selenium/webdriver/remote/webdriver.py", line 264, in get
self.execute(Command.GET, {'url': url})
File "/Users/samgao/.virtualenvs/tb_test/lib/python3.6/site->packages/selenium/webdriver/remote/webdriver.py", line 252, in execute
self.error_handler.check_response(response)
File "/Users/samgao/.virtualenvs/tb_test/lib/python3.6/site->packages/selenium/webdriver/remote/errorhandler.py", line 194, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Reached error page: >about:neterror?e=connectionFailure&u=http%3A//localhost%3A8000/&c=UTF->8&f=regular&d=Firefox%20can%E2%80%99t%20establish%20a%20connection%20to%20the%20s>erver%20at%20localhost%3A8000.
Basically the connection to localhost cannot be established.
The settings and configurations are identical to the tutorial in the previous link.
I have been struggling with the issue for two days, and would thank you most kindly if you could provide any help.
I got the same error and what solved for me was changing from localhost to 127.0.0.1:
old: self.browser.get('http://localhost:8000')
better: self.browser.get('http://127.0.0.1:8000')
I encountered the same problem, the final solution is: re-install again geckodriver
Unzip the geckodriver.zip
Move the file to /usr/bin directory sudo mv geckodriver /usr/bin
Goto /usr/bin directory cd /usr/bin,then you would need to run something like sudo chmod a+x geckodriver to mark it executable.
this might not be your situation, but I got the same error message when running a test (same book, hehe) without having anything actually listening on the targeted port (8000, in my case). Make sure there's something listening for a request by manually opening your browser and going to localhost:8000. In my case - silly me - I didn't have the server up at all =)
I also followed the same tutorial and came across the same error. I noticed that I am not running the django server. The following is what helped.
python manage.py runserver
python functional_test.py
Being that this is a snapshot (around Django 1.8's time) of "Obey The Testing Goat" - perhaps the instructions there are no longer relevant. I suggest going straight to the goat's mouth and starting over!
The issue could be related to virtualenvwrapper (which is no longer necessary) or it could be related to the port/address that you were trying to access. Depending on your version of Selenium and Firefox there may be issues related to that as well.
It depends on the situation.
Based on mine, after I changed the target URL, I can get the browser to load the URL normally, which means the original URL is not available.
Another way to check:
import requests
html = request.get(url)
Print the HTML, if you get the 503, which means the website is reachable.
Since this is probably a common search result for those working through Obey the Testing Goat, I wanted to share the solution that worked for me. I had written self.browser.get('http://localhost:8000') and needed to use http instead of https to resolve the error.
I got this problem in this situation: the application put the computer name to the proxy host,so the proxy like this:
theComputerName:proxyPort
but the theComputerName:proxyPort can not be visit,so I put this into the host:
127.0.0.1 theComputerName
then restart the application,the problem resolved perfect
I learning TDD tutorial too. My problem was that inputed uncorrect url
http://http://mysite insted of http://mysite

Web Deploy Package Error 'File ... does not exist'

I've trying to package up and old MVC 3 project to send it out but I keep getting a strange error where it telling me
'The file '/Views/Shared/print.Master' does not exist. /Views/Questionnaire/View.aspx'
But I can clearly see the file and have renamed it to try and fix it but no luck, then I tried changing the package settings to include everything but that too didn't fix it so does anybody have any idea why this could be happening? (btw it's a 2nd master file)
Any ideas or help would be much appreciated.
Solution was to check file Properties and set 'Build Action' to 'Content'.

Ruby, Sinatra and Passenger config on Apache

This is potentially a simple question but I wanted to ask to avoid running around in circles.
I have installed ruby 1.9.2 on Ubuntu and have set up passenger to run with Apache 2.2 on the machine. I am getting the following error when I view the site:
Permission denied - log/sinatra.log
I have changed the permissions for the log directory, but still no luck. The full trace from passenger can be seen on the site page: http://monkeh.me/
Does anyone know if/what I've done wrong or what's happening?
Many thanks
EDIT
I have discovered that the site runs well using WEBrick on port 4567 on the production server, but the same code errors using Passenger. I have added to show exceptions for errors, so am now getting the following:
NoMethodError at /
undefined method `include?' for nil:NilClass
file: resource.rb location: block in attributes= line: 332
You can see this here: http://www.monkeh.me/?url=http://www.google.co.uk
Any ideas? Please help :)
The new issue with the nil class was due to not finalizing the classes properly. I needed to add the following after the models were loaded:
DataMapper.finalize
Thanks to #Frost for his continued help within the comments.

Heroku error "Unexpected error while processing request: can't convert nil into String"

I have a Sinatra app that is located here https://github.com/trivektor/Backbone-Hangman. The first time I push it to Heroku, everything worked fine. However, on the second push my application crashed. The only thing that I changed was CSS. Checking the logs, I found the message
Unexpected error while processing request: can't convert nil into String
Does anyone know why this is happening? Thanks.
Sometime the lack of a closing } can cause this. Check those in all your css files and prescompile assets for production.
RAILS_ENV=production bundle exec rake assets:precompileHere is some more details
I was getting the same error in a Sinatra app this week. Looking at the git repo provided by this questions author, I saw this commit. It fixed the issue I was having.
I had this issue using sinatra-activerecord. Updating my database and rebooting the environment did the trick for me:
rake db:migrate

Resources