1

I upgraded laravel spark to version six and connected to the github repo on the site. Everything seemed to go OK on the npm install command, but when I ran the npm run dev, I got a slew of errors that basically told me that things related to spark were not found. Seems to be related to the new mix stuff? Do I need a new github token?

These dependencies were not found:
* auth/register-braintree in ./resources/assets/js/spark-components/auth/register-braintree.js
* auth/register-stripe in ./resources/assets/js/spark-components/auth/register-stripe.js
* kiosk/add-discount in ./resources/assets/js/spark-components/kiosk/add-discount.js
....

It suggested that I install these dependencies but running those commands resulting in an error that seems like I am being denied access to the github repo.

Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t ssh://git@github.com/auth/register-braintree.git
npm ERR! 
npm ERR! Warning: Permanently added the RSA host key for IP address '192.30.253.113' to the list of known hosts.
npm ERR! Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR! 
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.

I bet that there is a connection on github somewhere that I am missing. I connected to the repo on the site ...

Joshua Foxworth
  • 1,236
  • 1
  • 22
  • 50

2 Answers2

2

There were several problems that appeared to combine to cause this error. The first was that version 6 of Laravel spark went to a naming structure and the base path in the web pack needed to be changed from ...

path.resolve(__dirname, 'vendor/laravel/spark/resources/assets/js'),

... to ...

path.resolve(__dirname, 'vendor/laravel/spark-aurelius/resources/assets/js'),

The second error was that the file-loader package seems to have been needed. I am not totally sure that this was necessary for this particular fix, but you should be aware that it seems to be needed.

Joshua Foxworth
  • 1,236
  • 1
  • 22
  • 50
1

Please make sure you have the correct access rights and the repository exists.

So either github.com/auth/register-braintree is a private repo, and you need to have your account added as a collaborator, even just for accessing/cloning said repo.

Or the URL is not the correct one at all. A public repo can be accessed/cloned by ssh or https without authentication (so no token at all).
Check if this is one of the repos from the braintree GitHub organization.

Check also if spatie/laravel-mix-purgecss issue 20 applies here:

I found the problem:
My package.json file was referring to "laravel-mix": "1.*".
I changed to "laravel-mix": "2.*" and all ran fine.
I should have read the installation guide more closely.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • That appears that it may indeed be the problem. However, moving to mix 2.0.0 removes the node_modules/cross-env/ folder that is called out in the version 5 installer guide for Laravel spark – Joshua Foxworth Mar 17 '18 at 01:23
  • @JoshuaFoxworth Does that mean the project is not compatible with that mix mode? – VonC Mar 17 '18 at 01:30
  • Not sure. It seems like it won't build properly without mix version 2 as you get the errors I asked in the original question. However, version 2 fixes those errors but is clearly unusable... – Joshua Foxworth Mar 17 '18 at 01:36
  • Well, I found the paths to the scripts in version 2.0.0 of the webpack. Those errors still exist though – Joshua Foxworth Mar 17 '18 at 02:15