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

npm install -g next? #56

Closed
purplecones opened this issue Oct 25, 2016 · 6 comments
Closed

npm install -g next? #56

purplecones opened this issue Oct 25, 2016 · 6 comments

Comments

@purplecones
Copy link

purplecones commented Oct 25, 2016

Following the readme example, it indicates to install next with npm install next --save. I couldnt get the example to work this way.

zsh: command not found: next

Shouldn't this be npm install -g next so that the next command is global?

@davemo
Copy link

davemo commented Oct 25, 2016

@purplecones I just added a script to package.json like so:

"scripts": {
    "start": "next"
  },

and then ran npm start

@impronunciable
Copy link
Contributor

@purplecones usually you use npm scripts. Npm knows how to locate next inside the package. It's recommended to install it locally mostly because you can have different versions in different projects

{
  "name": "my-app",
  "dependencies": {
    "next": "*"
  },
  "scripts": {
    "dev": "next",
    "build": "next build",
    "start": "next start"
  }
}

@purplecones
Copy link
Author

@davemo @impronunciable oh ok. Any reason why this CLI from zeit should be used this way? now and ns that I use are all global.

@impronunciable
Copy link
Contributor

@purplecones with now you are interfacing the now API and you'll want to be always at the last version. Is not the case of a front end framework

@fabricionaweb
Copy link

next init probably better work and sense for global installations

@purplecones
Copy link
Author

@impronunciable @fabricionaweb thanks

@lock lock bot locked as resolved and limited conversation to collaborators May 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants