Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ccc_interns's avatar

Spark Installation

I ran spark new project-name

According to the documentation "Spark will then be installed into the project and configured automatically".

When prompted whether or not to install dependencies I entered yes for both npm and gulp. The result is not as pretty as shown in documentation.

http://i.imgur.com/PKXXON4.png?1

What is going on?

0 likes
16 replies
videra's avatar

First confirm that your nodejs, npm, composer and gulp do work:

node -v
npm -v
composer about
gulp -v

If this step fails you need to install them properly, check the documentation in their websites.

If that works then try to run this manually from inside the project's root folder

composer update
npm install
gulp
ccc_interns's avatar

node -v

v5.10.1

npm -v

3.8.3

composer about

Composer is a dependency manager tracking local dependencies of your projects and libraries.
See https://getcomposer.org/ for more information.

That worked so then I ran

composer update
npm install
gulp

Still seeing the same result. I can certainly paste a response for each of these but seams like overkill.

zachleigh's avatar

When you open the page in the browser, do you get any errors in the dev tools console?

zachleigh's avatar

What server are you using? Can you go into public and verify that the files exist?

videra's avatar

I think gulp is not compiling app.less and generating the required files.

Run gulp and check if it drops any error.

ccc_interns's avatar

No errors when running gulp.


Fetching Less Source Files...
   - resources/assets/less/app.less


Saving To...
   - public/css/app.css

[22:34:30] Finished 'default' after 1.85 s
[22:34:32] gulp-notify: [Laravel Elixir] Less Compiled!
[22:34:32] Finished 'less' after 4.23 s
[22:34:32] Starting 'browserify'...
vitr's avatar

@ccc_interns the initial command

spark new project-name

must show you some error messages. do you have laravel installer? try this

laravel -v

and actually, what url did you visit on the screenshot? perhaps, you just misconfigured the webserver

ccc_interns's avatar

Here is everything from the beginning. I hope this helps.

composer global require "laravel/spark-installer":"v1.0.3"

Changed current directory to /Users/anthony/.composer
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing symfony/finder (v3.0.4)
    Loading from cache

  - Installing illuminate/filesystem (v5.2.28)
    Loading from cache


  - Removing laravel/spark-installer (v1.0.0)
  - Installing laravel/spark-installer (v1.0.3)
    Downloading: 100%

illuminate/filesystem suggests installing league/flysystem (Required to use the Flysystem local and FTP
drivers (~1.0).)
illuminate/filesystem suggests installing league/flysystem-aws-s3-v3 (Required to use the Flysystem S3 d
river (~1.0).)
illuminate/filesystem suggests installing league/flysystem-rackspace (Required to use the Flysystem Rack
space driver (~1.0).)
Writing lock file
Generating autoload files

Register spark key
spark register $myToken

Validating Token: ✔
Thanks for registering Spark!

Looks like it's coming along... Create new spark project spark new project-name

Laravel Spark installed. Create something amazing!

 Would you like to install the NPM dependencies? (yes/no) [yes]:
 > yes

Installing NPM Dependencies...
 Would you like to run Gulp? (yes/no) [yes]:
 > yes

Running Gulp...

[23:41:55] Finished 'copy' after 5.04 ms

Load registration page http://localhost:8888/aye/public/register and.... http://i.imgur.com/PKXXON4.png?1

Is it because I'm loading form /public/?

jimmck's avatar

If you mean the public folder in a Laravel install? No you dont install things in there, thats for your content. You should be using a top level directory.

jimmck's avatar

public is the root of your exposed web content directory and should not be part of your URL. Is aye a route? Does your Spark welcome screen pop up?

vitr's avatar
vitr
Best Answer
Level 4

@ccc_interns seems you're doing everything right, except the the app url

http://localhost:8888/aye/public/register

this doesn't look like valid route. What is your websererver configuration? please, have a look at my nginx conf (just the beginning of it)

server {
    listen 80;
    listen 443 ssl;
    server_name sparkle.dev;
    root "/home/vagrant/Code/Sparkle/public";
...

see, the root pointed to the public dir and you can access the app at http://sparkle.dev/, in your case you should set

server {
    listen 8888;
    server_name localhost;
    root "/<actual_path_to_your_app>/public/";
...

where <actual_path_to_your_app> is the path from the root /

RushVan's avatar

Having a similar issue. New install via the composer method. Out of the box all links have leading /. This is unlike every other Laravel app I am running on this box. Most of those use blade url helper out of the box. Issue - /login routes to http://localhost/login (throws 404). If I edit my server config won't this impact all the other apps on the machine? Surely the answer can't be to remove every leading / in the Spark files!?

Please or to participate in this conversation.