excid3 / jumpstart

Easily jumpstart a new Rails application with a bunch of great features by default
http://jumpstartrails.com
MIT License
1.2k stars 316 forks source link

bin/dev failing for a new rails app #162

Closed giuseb closed 3 years ago

giuseb commented 3 years ago

My setup:

rails 7.0.0.alpha2
node v14.17.6
npm 6.14.15
yarn 1.22.10
ruby 3.0.2
foreman 0.87.2

My attempt:

$ rails new jumping -m https://raw.githubusercontent.com/excid3/jumpstart/master/template.rb --skip-javascript
$ cd jumping
$ rails db:create db:migrate
$ bin/dev

09:09:28 web.1    | started with pid 27464
09:09:28 worker.1 | started with pid 27465
09:09:28 js.1     | started with pid 27466
09:09:28 css.1    | started with pid 27467
09:09:28 css.1    | yarn run v1.22.10
09:09:28 js.1     | yarn run v1.22.10
09:09:28 css.1    | error Command "build:css" not found.
09:09:28 js.1     | error Command "build" not found.
09:09:28 css.1    | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
09:09:28 js.1     | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
09:09:29 css.1    | exited with code 1
09:09:29 system   | sending SIGTERM to all processes
09:09:29 js.1     | exited with code 1
09:09:29 worker.1 | terminated by SIGTERM
09:09:29 web.1    | terminated by SIGTERM

Anything to do with jumpstart? Thanks!

gathuku commented 3 years ago

@giuseb Confirm you have this in package.json

"scripts": {
    "build": "node esbuild.config.js",
    "build:css": "sass ./app/assets/stylesheets/application.bootstrap.scss ./app/assets/builds/application.css --no-source-map --load-path=node_modules" 
  }
giuseb commented 3 years ago

@gathuku, I did not have this snippet, now it works, thank you.

Shouldn't this be inserted by the jumpstart script, or at least mentioned in the readme?

gathuku commented 3 years ago

There's a command for that npm set-script from npm >= 7.1. Time to upgrade npm :) https://github.com/excid3/jumpstart/blob/51f8376c9bad04fed49f10192ace6c9df46c5937/template.rb#L244-L252

giuseb commented 3 years ago

Ah, yes, I re-ran the script and found the notice scrolling back, thank you.

May I suggest that, given the output's verbosity, all actionable information be shown at the end of the process, along the To get started with your new app: block.

Cheers!

gathuku commented 3 years ago

@giuseb the suggestion is good, Am sure @excid3 will like it.