-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Getting gatsby setup locally #518
Comments
From the stack trace it looks like it might have something to do with |
I am also experiencing similar issues, but when installing globally. Node 6.3.0, OSX Sierra.
|
@oliverbenns could you try uninstalling and installing again? |
Yeah I have done, and restarted. I was convinced this was the culprit, alas, it is not the case. |
Hmmm... I just installed gatsby global from scratch and created a new site and it worked as expected... Have you tried just cloning a starter directly and running |
Ok I managed to fix it. I deleted my But when I ran the global install beforehand I did it above the directory to ensure it didn't traverse to |
Not sure if this should be an issue of its own. I had issues getting gatsby working on windows. On the windows 10 ubuntu bash couldn't get it working at all. When I installed node with the official installer from their website, I still needed to do npm install --save react-motion react-responsive-grid underscore.string chroma-js color-pairs-picker typography-plugin-code after "npm install -g gatsby" to get my version of gatsby-starter-documentation to actually served in gatsby develop on localhost. |
Did you run "npm install" in the site's root?
…On Wed, Jan 18, 2017, 9:36 AM Olli Savolainen ***@***.***> wrote:
Not sure if this should be an issue of its own. I had issues getting
gatsby working on windows. On the windows 10 ubuntu bash couldn't get it
working at all.
When I installed node with the official installer from their website, I
still needed to do
npm install --save react-motion react-responsive-grid underscore.string
chroma-js color-pairs-picker typography-plugin-code
after "npm install -g gatsby" to get my version of
gatsby-starter-documentation to actually served in gatsby develop on
localhost.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#518 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEVh3f4z6IrYEky9iGESETMs2mvaT4jks5rTk2EgaJpZM4Kh2AF>
.
|
Oh - no. Node's overall logic still eludes me, as I don't use it regularly. I assumed the instructions at https://github.com/gatsbyjs/gatsby#getting-started suffice. Since the documentation site starter was already there and cloned via git, I didn't assume I needed to do that again. Although I can now see that those are not included in the git repo and so it makes sense to fetch the deps separately, well. It also makes a lot of sense for newbs to assume the ordinary logic of having an application and data files of that application being self-contained. Perhaps an UX point to consider in the long run? For example, have "gatsby develop" recognize when deps are not there and suggest user to run 'npm install'. |
@savolai did you create the site with We do check if Gatsby itself is installed. Beyond that, it's a bit hard to know for sure if a dependency is "needed" or not. Perhaps there are some additional low-hanging dependency checks we could add. |
Oh right, my bad. Didn't realize I can use gatsby new for starters, as well. |
"gatsby": "^0.12.18"
node: v6.3.1
macOS Sierra
I am moving this to a new issue from a discovery I made on #483 in regards to setting up gatsby locally.
After some troubleshooting, I believe the problem is happening with babel. I have followed the steps in
CONTRIBUTING.md
, but when I rungatsby new project-name
I get the following output:/Users/brianstone/code/gatsby/node_modules/babel-core/lib/transformation/file/index.js:600 throw err; ^ Error: /Users/brianstone/code/gatsby/dist/bin/cli.js: Cannot find module at PluginPass.Program (/Users/brianstone/code/gatsby/node_modules/babel-plugin-lodash/lib/index.js:97:15) at newFn (/Users/brianstone/code/gatsby/node_modules/babel-traverse/lib/visitors.js:276:21) at NodePath._call (/Users/brianstone/code/gatsby/node_modules/babel-traverse/lib/path/context.js:76:18) at NodePath.call (/Users/brianstone/code/gatsby/node_modules/babel-traverse/lib/path/context.js:48:17) at NodePath.visit (/Users/brianstone/code/gatsby/node_modules/babel-traverse/lib/path/context.js:105:12) at TraversalContext.visitQueue (/Users/brianstone/code/gatsby/node_modules/babel-traverse/lib/context.js:150:16) at TraversalContext.visitSingle (/Users/brianstone/code/gatsby/node_modules/babel-traverse/lib/context.js:108:19) at TraversalContext.visit (/Users/brianstone/code/gatsby/node_modules/babel-traverse/lib/context.js:192:19) at Function.traverse.node (/Users/brianstone/code/gatsby/node_modules/babel-traverse/lib/index.js:114:17) at traverse (/Users/brianstone/code/gatsby/node_modules/babel-traverse/lib/index.js:79:12) at File.transform (/Users/brianstone/code/gatsby/node_modules/babel-core/lib/transformation/file/index.js:558:35) at /Users/brianstone/code/gatsby/node_modules/babel-core/lib/transformation/pipeline.js:50:19 at File.wrap (/Users/brianstone/code/gatsby/node_modules/babel-core/lib/transformation/file/index.js:574:16) at Pipeline.transform (/Users/brianstone/code/gatsby/node_modules/babel-core/lib/transformation/pipeline.js:47:17) at Object.transformFileSync (/Users/brianstone/code/gatsby/node_modules/babel-core/lib/api/node.js:138:10) at compile (/Users/brianstone/code/gatsby/node_modules/babel-register/lib/node.js:118:20) at loader (/Users/brianstone/code/gatsby/node_modules/babel-register/lib/node.js:144:14) at Object.require.extensions.(anonymous function) [as .js] (/Users/brianstone/code/gatsby/node_modules/babel-register/lib/node.js:154:7) at Module.load (/Users/brianstone/code/gatsby/node_modules/coffee-script/lib/coffee-script/register.js:45:36) at tryModuleLoad (module.js:417:12) at Function.Module._load (module.js:409:3) at Module.require (module.js:468:17) at require (internal/module.js:20:19) at loadGatsby (/Users/brianstone/code/gatsby/bin/gatsby.js:30:3) at /Users/brianstone/code/gatsby/bin/gatsby.js:44:5 at FSReqWrap.oncomplete (fs.js:123:15)
I feel like this has something to do with babel not transpiling properly here:
Any ideas as to why this might be happening?
The text was updated successfully, but these errors were encountered: