Giter Site home page Giter Site logo

Commands don't work on Window (Error: Cannot find module '...\npm\node_modules\gatsby\bin\cli-new' on `gatsby new`) about gatsby HOT 11 CLOSED

gatsbyjs avatar gatsbyjs commented on April 28, 2024
Commands don't work on Window (Error: Cannot find module '...\npm\node_modules\gatsby\bin\cli-new' on `gatsby new`)

from gatsby.

Comments (11)

MihailDemchenko avatar MihailDemchenko commented on April 28, 2024 1

on windows 10
need rename files
C:\Users\aniru\AppData\Roaming\npm\node_modules\gatsby\bin\gatsby-serve.js to cli-serve.js
C:\Users\aniru\AppData\Roaming\npm\node_modules\gatsby\bin\gatsby-build.js to cli-build.js
C:\Users\aniru\AppData\Roaming\npm\node_modules\gatsby\bin\gatsby-new.js to cli-new.js

from gatsby.

cable729 avatar cable729 commented on April 28, 2024 1

Same issue on Windows 10, Node v5.5.0, Gatsby 0.7.7. Although, I had to update different files:

%appdata%\npm\node_modules\gatsby\bin\cli.js => cli-serve.js
%appdata%\npm\node_modules\gatsby\bin\gatsby-build.js => cli-build.js 
%appdata%\npm\node_modules\gatsby\bin\gatsby-new.js => cli-new.js

And to run gatsby develop I had to do rename

%appdata%\npm\node_modules\gatsby\bin\gatsby-develop.js => cli-develop.js

from gatsby.

KyleAMathews avatar KyleAMathews commented on April 28, 2024

I'm not at all familiar with NPM on Windows... perhaps this StackOverflow answer will help? Please report back if you figure it out! http://stackoverflow.com/questions/9587665/nodejs-cannot-find-installed-module-on-windows

from gatsby.

anrddh avatar anrddh commented on April 28, 2024

@michaeldemchenko That fixed it! Thanks a lot. Why don't you open a PR to add this to the readme until the issue gets fixed?

from gatsby.

suenot avatar suenot commented on April 28, 2024

👍 have the save problem in windows 7

from gatsby.

KyleAMathews avatar KyleAMathews commented on April 28, 2024

This PR in commander.js seems related. There's been other people reporting problems with git-style subcommands on Windows.

What version of node are y'all using? Curious if it's only older versions causing trouble.

from gatsby.

MihailDemchenko avatar MihailDemchenko commented on April 28, 2024

I use v4.2.2

from gatsby.

PMByrne avatar PMByrne commented on April 28, 2024

Node v4.2.3 on Windows 10

I'm getting this as of Gatsby 0.7.7 so this is still an issue.

from gatsby.

SaintPeter avatar SaintPeter commented on April 28, 2024

Same issue on Windows 10, Node v4.2.2, Gatsby 0.7.7

Renaming the files as described above fixed the issue for me.

Thanks @michaeldemchenko

from gatsby.

KyleAMathews avatar KyleAMathews commented on April 28, 2024

Hey peeps, @NogsMPLS submitted a PR which should fix this issue. I released 0.8.5 with his PR included — could some of you install this and report back if Gatsby does indeed now work correctly on Windows?

from gatsby.

KyleAMathews avatar KyleAMathews commented on April 28, 2024

Closing this out. Please comment if this problem still exists or open a new issue if you discover other problems on Windows.

from gatsby.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.