Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ng help does not work outside an CLI generated project #3989

Closed
SanderElias opened this issue Jan 13, 2017 · 9 comments
Closed

ng help does not work outside an CLI generated project #3989

SanderElias opened this issue Jan 13, 2017 · 9 comments
Labels
help wanted needs: investigation Requires some digging to determine if action is needed

Comments

@SanderElias
Copy link

SanderElias commented Jan 13, 2017

OS?

Ubuntu 16.04.1 LTS

Versions.

angular-cli: 1.0.0-beta.25.5
node: 6.9.4
os: linux x64

Repro steps.

cd ~/nonCLIfolder
ng help

The log given by the failure.

at Object.Module._extensions..js (module.js:579:10)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/local/share/.config/yarn/global/node_modules/micromatch/lib/expand.js:10:13)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/local/share/.config/yarn/global/node_modules/micromatch/index.js:10:14)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/local/share/.config/yarn/global/node_modules/anymatch/index.js:4:18)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/local/share/.config/yarn/global/node_modules/chokidar/index.js:6:16)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/local/share/.config/yarn/global/node_modules/webpack-dev-server/lib/Server.js:2:16)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/local/share/.config/yarn/global/node_modules/angular-cli/tasks/serve-webpack.js:8:24)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/local/share/.config/yarn/global/node_modules/angular-cli/commands/serve.run.js:6:23)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at /usr/local/share/.config/yarn/global/node_modules/angular-cli/commands/help.js:29:33
at Array.reduce (native)
at Class.run (/usr/local/share/.config/yarn/global/node_modules/angular-cli/commands/help.js:27:39)
at Class.<anonymous> (/usr/local/share/.config/yarn/global/node_modules/angular-cli/ember-cli/lib/models/command.js:147:17)
at process._tickCallback (internal/process/next_tick.js:103:7)

Not a big issue, but if you want to get the option for ng new its a bit of a bummer.

@CarreraPHP
Copy link
Contributor

ng help works fine in macOS Sierra. must be linux specific issue

however, I see No help entry for 'serve.run' message within the help content. other than serve it occurs for init, github-pages-deploy and build.

ng lint
  Lints code in existing project

ng new <options...>
  Creates a new directory and runs ng init in it.
  --dry-run (Boolean) (Default: false)
    aliases: -d
  --verbose (Boolean) (Default: false)
    aliases: -v
  --link-cli (Boolean) (Default: false)
    aliases: -lc
  --skip-npm (Boolean) (Default: false)
    aliases: -sn
  --skip-git (Boolean) (Default: false)
    aliases: -sg
  --skip-tests (Boolean) (Default: false)
    aliases: -st
  --skip-commit (Boolean) (Default: false)
    aliases: -sc
  --directory (String)
    aliases: -dir <value>
  --source-dir (String) (Default: src)
    aliases: -sd <value>
  --style (String) (Default: css)
  --prefix (String) (Default: app)
    aliases: -p <value>
  --mobile (Boolean) (Default: false)
  --routing (Boolean) (Default: false)
  --inline-style (Boolean) (Default: false)
    aliases: -is
  --inline-template (Boolean) (Default: false)
    aliases: -it

No help entry for 'serve.run'
ng serve <options...>
  Builds and serves your app, rebuilding on file changes.
  aliases: server, s
  --port (Number) (Default: 4200)
    aliases: -p <value>
  --host (String) (Default: localhost) Listens only on localhost by default
    aliases: -H <value>
  --proxy-config (Path)
    aliases: -pc <value>
  --watcher (String) (Default: events)
    aliases: -w <value>
  --live-reload (Boolean) (Default: true)
    aliases: -lr
  --live-reload-host (String) Defaults to host
    aliases: -lrh <value>
  --live-reload-base-url (String) Defaults to baseURL
    aliases: -lrbu <value>
  --live-reload-port (Number) (Defaults to port number within [49152...65535])
    aliases: -lrp <value>
  --live-reload-live-css (Boolean) (Default: true) Whether to live reload CSS (default true)
  --target (String) (Default: development)
    aliases: -t <value>, -dev (--target=development), -prod (--target=production)
  --environment (String) (Default: )
    aliases: -e <value>
  --ssl (Boolean) (Default: false)
  --ssl-key (String) (Default: ssl/server.key)
  --ssl-cert (String) (Default: ssl/server.crt)
  --aot (Boolean) (Default: false)
  --sourcemap (Boolean) (Default: true)
    aliases: -sm
  --vendor-chunk (Boolean) (Default: true)
  --verbose (Boolean) (Default: false)
  --progress (Boolean) (Default: true)
  --open (Boolean) (Default: false) Opens the url in default browser
    aliases: -o
  --hmr (Boolean) (Default: false) Enable hot module replacement
  --i18n-file (String) (Default: null)
  --i18n-format (String) (Default: null)
  --locale (String) (Default: null)
  --extract-css (Boolean) (Default: null)

@filipesilva
Copy link
Contributor

I also seem to be able to run ng help outside of a project on Windows. Leaving this open to see if more people have this problem and if it's just on Linux machines.

@CarreraPHP yeah those entries in red are a bug. I'll make an issue for it. #3994

@filipesilva filipesilva added help wanted needs: investigation Requires some digging to determine if action is needed labels Jan 13, 2017
@clydin
Copy link
Member

clydin commented Jan 13, 2017

Could be yarn related. Does it happen if installed with npm?

@SanderElias
Copy link
Author

@clydin. I wanted to check out your premises. So I removed the global CLI, installed it again with NPM, and it worked. I can now confirm it does not work when installed global with yarn, but it does work when installed with NPM. (I double-checked.)

Hmm, should I file an issue at yarn for this, or is it still a CLI issue?

@0radek
Copy link

0radek commented Jan 16, 2017

I think you need to set a path variable for the /bin for Yarn. I think by default it saves your dependencies somewhere else (not sure where, I had to do it a long time ago because I had a similar issue). Hope that helps.

@SanderElias
Copy link
Author

@ScaryWolfMan This might be the solution, but then again, I expect my package manager to handle that, as it is its job. Unless the CLI does something dirty in this regards. Then it's a CLI issue. Hence my question about where I should file the issue.

@beeman
Copy link
Contributor

beeman commented Jan 21, 2017

This is most likely related to yarnpkg/yarn#648

@hansl
Copy link
Contributor

hansl commented Jan 21, 2017

Closing this as yarn only.

@hansl hansl closed this as completed Jan 21, 2017
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted needs: investigation Requires some digging to determine if action is needed
Projects
None yet
Development

No branches or pull requests

7 participants