balderdashy / balderdashy/sails

Failing to generate new sails app using --without=session,views

Open
#4,732 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug resolved try this out please
Dominant language
JavaScript
Stars
22.8k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

Sails version: 1.1.0
Node version: 11.3.0
NPM version: 6.7
DB adapter name: N/A
DB adapter version: N/A
Operating system: Mac


Terminal: iTerm2 on ZSH

Sails is throwing the following when I run sails new api --without=views,session

$ sails new api --without 'views,session'                                                           
 Choose a template for your new Sails app:
 1. Web App  ·  Extensible project with auth, login, & password recovery
 2. Empty    ·  An empty Sails app, yours to configure
 (type "?" for help, or <CTRL+C> to cancel)
? 2
error: Error: Couldn't create a new Sails app.  The provided `without` option contains 11 unrecognized entries: v,i,e,w,s,,,o,n,a,y,c
    at /Users/em/.config/yarn/global/node_modules/sails-generate/lib/core-generators/new/before.js:243:21
    at /Users/em/.config/yarn/global/node_modules/sails-generate/lib/core-generators/new/before.js:106:18
    at Interface.onLine (/Users/em/.config/yarn/global/node_modules/read/lib/read.js:111:5)
    at Interface.emit (events.js:182:13)
    at Interface.EventEmitter.emit (domain.js:441:20)
    at Interface._onLine (readline.js:301:10)
    at Interface._line (readline.js:673:8)
    at Interface._ttyWrite (readline.js:952:14)
    at ReadStream.onkeypress (readline.js:178:10)
    at ReadStream.emit (events.js:182:13)
    at ReadStream.EventEmitter.emit (domain.js:441:20)
    at emitKeys (internal/readline.js:424:14)
    at emitKeys.next (<anonymous>)
    at ReadStream.onData (readline.js:1055:36)
    at ReadStream.emit (events.js:182:13)
    at ReadStream.EventEmitter.emit (domain.js:441:20)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with sails new api --without=views,session and inspect sails-generate/lib/core-generators/new/before.js, the file named in the stack trace. Trace how the without option is parsed, then verify that the documented comma-separated values are accepted and that a generated app omits the requested features.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.