Help a newb with HubSpot integration?

  • 1
  • Question
  • Updated 3 weeks ago
I am trying to follow along to get this working: https://github.com/zxdong262/hubspot-embeddable-ringcentral-phone#features

I think I have my dev environment ok.  I use MacOS 10.14 and installed Xcode, node, npm, etc.

I have gotten as far as copying the config.sample.js to config.js and editing it with my HubSpot tokens.

When I run npm start I end up with the following error and the terminal hangs. I try the next step of adding the extension in Chrome and it doesn't work.

WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets: 
  content.js (365 KiB)
WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
  content (365 KiB)
      content.js

WARNING in webpack performance recommendations: 
You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
For more info visit https://webpack.js.org/guides/code-splitting/


Can anyone give me a hint of where I might be going wrong?

Thank you. 
Photo of Brandon

Brandon

  • 1,086 Points 1k badge 2x thumb

Posted 3 weeks ago

  • 1
Photo of Tyler Long

Tyler Long, Official Rep

  • 7,802 Points 5k badge 2x thumb
As far as I can tell the warnings don't matter.

The issue seems to be in the folder you specified, there isn't a file named "content.js"
Photo of Tyler Long

Tyler Long, Official Rep

  • 7,802 Points 5k badge 2x thumb
I didn't try the code myself. I read it.

https://github.com/zxdong262/hubspot-embeddable-ringcentral-phone/blob/master/dist/manifest.json#L43

You can see that there is content.js configured in the manifest file. 

And there is also content.js file configured in webpack file: https://github.com/zxdong262/hubspot-embeddable-ringcentral-phone/blob/master/webpack.config.js#L42

So what you need to do is to run webpack compile first to generate that content.js file.

Try "yarn build" command.
Photo of Brandon

Brandon

  • 1,086 Points 1k badge 2x thumb
Thank you for both suggestions.  I agree the warnings should not matter.

First, I tried yarn build and got the same result as npm start.  They seem to do the same thing.

And I confirmed I am ending up with a content.js file in /dist


Brandons-MacBook-Pro:dist brandonsvec$ pwd
/Users/brandonsvec/Downloads/hubspot-embeddable-ringcentral-phone/dist
Brandons-MacBook-Pro:dist brandonsvec$ ls -alrt
total 1488
-rw-r--r--   1 brandonsvec  staff     896 Oct  2 14:27 background.js
drwxr-xr-x   6 brandonsvec  staff     192 Oct  2 14:27 icons
drwxr-xr-x  20 brandonsvec  staff     640 Oct  2 14:54 ..
-rw-r--r--   1 brandonsvec  staff  373480 Oct  2 17:05 content.js
-rw-r--r--   1 brandonsvec  staff    3790 Oct  2 17:05 redirect.js
-rw-r--r--   1 brandonsvec  staff  370928 Oct  2 17:05 content.js.map
drwxr-xr-x   8 brandonsvec  staff     256 Oct  2 17:05 .
-rw-r--r--   1 brandonsvec  staff    1323 Oct  2 17:05 manifest.json

One odd thing I noticed and am not sure if is relevant is that I can only see and edit the content.js file in the terminal but do not see it in the finder (even though I am showing hidden files).  It seems if I can't view it in the finder then it makes sense Chrome can't find it either when I try to add it.



I'm just learning as I go here, but I feel like I am missing some basic understanding of how this should all work..

Thanks for any additional advice.
Photo of Brandon

Brandon

  • 1,086 Points 1k badge 2x thumb
I found my error.  Somehow I created two similar directories when setting this up.  Not sure how I got the -master one, but once I realized this and used the correct directory I got it working.  Thanks.