# Setting up Your Project on Netlify

**URL:** <https://discourse.sst.dev/t/setting-up-your-project-on-netlify/190>\
**Category:** Chapter Comments\
**Created:** [May 9, 2018, 11:24pm UTC](https://discourse.sst.dev/t/setting-up-your-project-on-netlify/190 "2018-05-09T23:24:23Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![jayair](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/jayair/32/9_2.png) [@jayair](https://discourse.sst.dev/u/jayair)\
**Post date:** [May 9, 2018, 11:24pm UTC](https://discourse.sst.dev/t/setting-up-your-project-on-netlify/190/1 "2018-05-09T23:24:23Z")

</div>

Link to chapter - [https://serverless-stack.com/chapters/setting-up-your-project-on-netlify.html](https://serverless-stack.com/chapters/setting-up-your-project-on-netlify.html)

---

<div class="post-metadata">

**Author:** ![peetss](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/peetss/32/546_2.png) [@peetss](https://discourse.sst.dev/u/peetss)\
**Post date:** [July 23, 2018, 3:01am UTC](https://discourse.sst.dev/t/setting-up-your-project-on-netlify/190/2 "2018-07-23T03:01:56Z")

</div>

![](https://canada1.discourse-cdn.com/flex032/uploads/serverless_stack/original/1X/f0f19783a61cd167cba566a6566db5c80422e423.png)

What is `REACT_APP_STAGE=staging npm run build:netlify`

Staging is not an env we setup in the tutorial, should this be something else?

---

<div class="post-metadata">

**Author:** ![jayair](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/jayair/32/9_2.png) [@jayair](https://discourse.sst.dev/u/jayair)\
**Post date:** [July 27, 2018, 11:13pm UTC](https://discourse.sst.dev/t/setting-up-your-project-on-netlify/190/3 "2018-07-27T23:13:05Z")

</div>

Good catch. I’ll update it. It should be `REACT_APP_STAGE=dev npm run build`.

---

<div class="post-metadata">

**Author:** ![mathewgries](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/mathewgries/32/419_2.png) [@mathewgries](https://discourse.sst.dev/u/mathewgries)\
**Post date:** [December 17, 2019, 8:43pm UTC](https://discourse.sst.dev/t/setting-up-your-project-on-netlify/190/4 "2019-12-17T20:43:25Z")

</div>

I would maybe update the page to state that we would need to type that in there too, so it doesn’t get overlooked. It doesn’t default to that text

---

<div class="post-metadata">

**Author:** ![jayair](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/jayair/32/9_2.png) [@jayair](https://discourse.sst.dev/u/jayair)\
**Post date:** [January 12, 2020, 2:58am UTC](https://discourse.sst.dev/t/setting-up-your-project-on-netlify/190/5 "2020-01-12T02:58:13Z")

</div>

Sorry which one are you referring to?

---

<div class="post-metadata">

**Author:** ![granto](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/granto/32/764_2.png) [@granto](https://discourse.sst.dev/u/granto)\
**Post date:** [February 26, 2020, 5:37am UTC](https://discourse.sst.dev/t/setting-up-your-project-on-netlify/190/6 "2020-02-26T05:37:02Z")

</div>

I believe @mathewgries was referring to Netlify not auto-populating that “build command” field. When I went through the steps, Netlify just had “npm run build” in that field. Also Netlify has “build/” in the publish directory field, whereas the example in the Guide doesn’t have the forward slash.

---

<div class="post-metadata">

**Author:** ![granto](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/granto/32/764_2.png) [@granto](https://discourse.sst.dev/u/granto)\
**Post date:** [February 26, 2020, 5:53am UTC](https://discourse.sst.dev/t/setting-up-your-project-on-netlify/190/7 "2020-02-26T05:53:01Z")

</div>

I ran into a Deploy Failed error. Here’s the log from Netlify. It says failed to compile and also says I’m missing react stripe elements. Any ideas on where I went wrong?

```auto
9:36:36 PM: Build ready to start
9:36:38 PM: build-image version: 9cade8af58c2cf3a17a1e9433d2e979149488837
9:36:38 PM: build-image tag: v3.3.5
9:36:38 PM: buildbot version: 6fd888c8d66fd09bb18f09e1728e11fbc555b868
9:36:38 PM: Fetching cached dependencies
9:36:38 PM: Failed to fetch cache, continuing with build
9:36:38 PM: Starting to prepare the repo for build
9:36:39 PM: No cached dependencies found. Cloning fresh repo
9:36:39 PM: git clone https://github.com/granto/serverless-stack-client
9:36:39 PM: Preparing Git Reference refs/heads/master
9:36:40 PM: Starting build script
9:36:40 PM: Installing dependencies
9:36:41 PM: Downloading and installing node v10.19.0...
9:36:42 PM: Downloading https://nodejs.org/dist/v10.19.0/node-v10.19.0-linux-x64.tar.xz...
9:36:42 PM: 
######################
9:36:42 PM: 31.9%
9:36:42 PM: 
#########################################
9:36:42 PM: ############################### 100.0%
9:36:42 PM: Computing checksum with sha256sum
9:36:42 PM: Checksums matched!
9:36:45 PM: Now using node v10.19.0 (npm v6.13.4)
9:36:45 PM: Attempting ruby version 2.6.2, read from environment
9:36:46 PM: Using ruby version 2.6.2
9:36:46 PM: Using PHP version 5.6
9:36:46 PM: Started restoring cached node modules
9:36:46 PM: Finished restoring cached node modules
9:36:47 PM: Installing NPM modules using NPM version 6.13.4
9:37:16 PM: > core-js@2.6.11 postinstall /opt/build/repo/node_modules/@babel/runtime-corejs2/node_modules/core-js
9:37:16 PM: > node -e "try{require('./postinstall')}catch(e){}"
9:37:16 PM: Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
9:37:16 PM: The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
9:37:16 PM: > https://opencollective.com/core-js 
9:37:16 PM: > https://www.patreon.com/zloirock 
9:37:16 PM: Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
9:37:16 PM: > core-js@2.6.11 postinstall /opt/build/repo/node_modules/babel-runtime/node_modules/core-js
9:37:16 PM: > node -e "try{require('./postinstall')}catch(e){}"
9:37:16 PM: > core-js@3.6.4 postinstall /opt/build/repo/node_modules/core-js
9:37:16 PM: > node -e "try{require('./postinstall')}catch(e){}"
9:37:19 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules/webpack-dev-server/node_modules/fsevents):
9:37:19 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
9:37:19 PM: npm
9:37:19 PM: WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules/watchpack/node_modules/fsevents):
9:37:19 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
9:37:19 PM: npm WARN
9:37:19 PM: optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules/jest-haste-map/node_modules/fsevents):
9:37:19 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
9:37:19 PM: npm WARN
9:37:19 PM: optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/fsevents):
9:37:19 PM: npm
9:37:19 PM: WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
9:37:19 PM: added 1628 packages from 863 contributors and audited 919098 packages in 31.443s
9:37:21 PM: 47 packages are looking for funding
9:37:21 PM: run `npm fund` for details
9:37:21 PM: found 0 vulnerabilities
9:37:21 PM: NPM modules installed
9:37:21 PM: Started restoring cached go cache
9:37:21 PM: Finished restoring cached go cache
9:37:21 PM: unset GOOS;
9:37:21 PM: unset GOARCH;
9:37:21 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64';
9:37:21 PM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
9:37:21 PM: go version >&2;
9:37:21 PM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env';
9:37:21 PM: go version go1.12 linux/amd64
9:37:21 PM: Installing missing commands
9:37:21 PM: Verify run directory
9:37:21 PM: Executing user command: REACT_APP_STAGE=dev npm run build
9:37:21 PM: > notes-app-client@0.1.0 build /opt/build/repo
9:37:21 PM: > react-scripts build
9:37:23 PM: Creating an optimized production build...
9:37:31 PM: Failed to compile.
9:37:31 PM: ./src/containers/Settings.js
9:37:31 PM: Cannot find module: 'react-stripe-elements'. Make sure this package is installed.
9:37:31 PM: You can install this package by running: npm install react-stripe-elements.
9:37:32 PM: npm
9:37:32 PM: ERR! code
9:37:32 PM: ELIFECYCLE
9:37:32 PM: npm
9:37:32 PM: ERR! errno 1
9:37:32 PM: npm
9:37:32 PM: ERR! notes-app-client@0.1.0 build: `react-scripts build`
9:37:32 PM: npm
9:37:32 PM: ERR!
9:37:32 PM: Exit status 1
9:37:32 PM: npm
9:37:32 PM: ERR!
9:37:32 PM: npm
9:37:32 PM: ERR!
9:37:32 PM: Failed at the notes-app-client@0.1.0 build script.
9:37:32 PM: npm
9:37:32 PM: ERR! This is probably not a problem with npm. There is likely additional logging output above.
9:37:32 PM: npm ERR! A complete log of this run can be found in:
9:37:32 PM: npm ERR! /opt/buildhome/.npm/_logs/2020-02-26T05_37_32_084Z-debug.log
9:37:32 PM: Skipping functions preparation step: no functions directory set
9:37:32 PM: Caching artifacts
9:37:32 PM: Started saving node modules
9:37:32 PM: Finished saving node modules
9:37:32 PM: Started saving pip cache
9:37:32 PM: Finished saving pip cache
9:37:32 PM: Started saving emacs cask dependencies
9:37:32 PM: Finished saving emacs cask dependencies
9:37:32 PM: Started saving maven dependencies
9:37:32 PM: Finished saving maven dependencies
9:37:32 PM: Started saving boot dependencies
9:37:32 PM: Finished saving boot dependencies
9:37:32 PM: Started saving go dependencies
9:37:32 PM: Finished saving go dependencies
9:37:35 PM: Error running command: Build script returned non-zero exit code: 1
9:37:35 PM: Failing build: Failed to build site
9:37:35 PM: failed during stage 'building site': Build script returned non-zero exit code: 1
9:37:35 PM: Finished processing build request in 56.643776464s

```

---

<div class="post-metadata">

**Author:** ![granto](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/granto/32/764_2.png) [@granto](https://discourse.sst.dev/u/granto)\
**Post date:** [February 27, 2020, 3:52pm UTC](https://discourse.sst.dev/t/setting-up-your-project-on-netlify/190/8 "2020-02-27T15:52:27Z")

</div>

@jayair I’m in over my head here and hoping maybe you see something obvious for me to fix?

---

<div class="post-metadata">

**Author:** ![granto](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/granto/32/764_2.png) [@granto](https://discourse.sst.dev/u/granto)\
**Post date:** [February 28, 2020, 4:11pm UTC](https://discourse.sst.dev/t/setting-up-your-project-on-netlify/190/9 "2020-02-28T16:11:33Z")

</div>

I got to it work so wanted to leave this tip here for anyone else that has a build fail. I needed to run “npm install react-stripe-elements” in my notes-app-client directory and then push to git.

---

<div class="post-metadata">

**Author:** ![markgargan](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/markgargan/32/903_2.png) [@markgargan](https://discourse.sst.dev/u/markgargan)\
**Post date:** [June 30, 2020, 10:47pm UTC](https://discourse.sst.dev/t/setting-up-your-project-on-netlify/190/10 "2020-06-30T22:47:37Z")

</div>

Hi folks,

Just in case it helps anyone else, I was working behind our corporate proxy so I had an .npmrc file in there with our corporate proxy. I checked this in and was getting the following exception.

Maximum call stack size exceeded on npm install

Removing the .npmrc allowed the build to continue.

Thanks,  
Mark.

---

<div class="post-metadata">

**Author:** ![Louiefigz](https://avatars.discourse-cdn.com/v4/letter/l/3da27b/32.png) [@Louiefigz](https://discourse.sst.dev/u/Louiefigz)\
**Post date:** [November 5, 2020, 5:55am UTC](https://discourse.sst.dev/t/setting-up-your-project-on-netlify/190/11 "2020-11-05T05:55:56Z")

</div>

For some reason my build is not passing. I believe its because it cannot find the config file. I’m trying to follow the tutorial as closely as possible and I’m wondering if anyone else has ran into this issue.

thanks!

 ![Screen Shot 2020-11-04 at 11.52.09 PM](https://canada1.discourse-cdn.com/flex032/uploads/serverless_stack/original/2X/3/33c17afea7a13fe8181bee8907aa60be1fb3e026.png)

---

<div class="post-metadata">

**Author:** ![jayair](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/jayair/32/9_2.png) [@jayair](https://discourse.sst.dev/u/jayair)\
**Post date:** [November 13, 2020, 6:23pm UTC](https://discourse.sst.dev/t/setting-up-your-project-on-netlify/190/12 "2020-11-13T18:23:54Z")

</div>

Can you make sure that you’ve checked in the config file into Git?
