trying to deploy react website.
works on GitHub, deploys on personal.
loops this code until it times out on server.
Tried several things to fix it, but rather new to heroku. Can anyone help out a new dev?
Trying to deploy site that uses mongo hosting after this but cant figure out this issue.
site has several pages in react they all work fine.
Site does calls to Facebook, Instagram, and twitter and they all work no issues.
basically everything works except deployment.
**-----> Node.js app detected
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NODE_ENV=production
NODE_MODULES_CACHE=true
NODE_VERBOSE=false
-----> Installing binaries
engines.node (package.json): 10.15.3
engines.npm (package.json): 6.11.3
Resolving node version 10.15.3...
Downloading and installing node 10.15.3...
Bootstrapping npm 6.11.3 (replacing 6.4.1)...
npm 6.11.3 installed
Resolving yarn version 1.17.3...
Downloading and installing yarn (1.17.3)...
Installed yarn 1.17.3
-----> Restoring cache
Cached directories were not restored due to a change in version of node, npm, yarn or stack
Module installation may take longer for this build
-----> Installing dependencies
Installing node modules (package.json + package-lock)
> node-sass#4.13.1 install /tmp/build_cd9fcefdac176fb187e7cf1f59c64288/node_modules/node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.13.1/linux-x64-64_binding.node
Download complete
Binary saved to /tmp/build_cd9fcefdac176fb187e7cf1f59c64288/node_modules/node-sass/vendor/linux-x64-64/binding.node
Caching binary to /tmp/npmcache.y9Gan/node-sass/4.13.1/linux-x64-64_binding.node
> core-js#2.6.11 postinstall /tmp/build_cd9fcefdac176fb187e7cf1f59c64288/node_modules/babel-runtime/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
> core-js#3.6.4 postinstall /tmp/build_cd9fcefdac176fb187e7cf1f59c64288/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
> core-js-pure#3.6.4 postinstall /tmp/build_cd9fcefdac176fb187e7cf1f59c64288/node_modules/core-js-pure
> node -e "try{require('./postinstall')}catch(e){}"
> node-sass#4.13.1 postinstall /tmp/build_cd9fcefdac176fb187e7cf1f59c64288/node_modules/node-sass
> node scripts/build.js
Binary found at /tmp/build_cd9fcefdac176fb187e7cf1f59c64288/node_modules/node-sass/vendor/linux-x64-64/binding.node
Testing binary
Binary is fine
> nodemon#2.0.2 postinstall /tmp/build_cd9fcefdac176fb187e7cf1f59c64288/node_modules/nodemon
> node bin/postinstall || exit 0
Love nodemon? You can now support the project via the open collective:
> https://opencollective.com/nodemon/donate
> backend#1.0.0 install /tmp/build_cd9fcefdac176fb187e7cf1f59c64288
> cd client && npm install
added 208 packages from 348 contributors and audited 1494 packages in 10.996s
found 0 vulnerabilities
added 1901 packages from 829 contributors and audited 914582 packages in 59.722s
found 0 vulnerabilities
-----> Build
Running build
> backend#1.0.0 build /tmp/build_cd9fcefdac176fb187e7cf1f59c64288
> cd client && npm run build
> atl-website#1.1.0 build /tmp/build_cd9fcefdac176fb187e7cf1f59c64288/client
> react-scripts build
Creating an optimized production build...
Compiled with warnings.
./src/utils/API.js
Line 2:10: 'func' is defined but never used no-unused-vars
./src/components/Layout/Sidebar.js
Line 7:3: 'MdBorderAll' is defined but never used no-unused-vars
Line 19:3: 'FaTwitter' is defined but never used no-unused-vars
Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.
File sizes after gzip:
77.65 KB build/static/js/3.09e16e2e.chunk.js
26.68 KB build/static/css/main.d5d3bbe0.chunk.css
20.28 KB build/static/js/4.db1c8c2a.chunk.js
6.38 KB build/static/js/0.5213ded1.chunk.js
4.49 KB build/static/js/main.0f3b7751.chunk.js
3.72 KB build/static/js/6.a609dcc4.chunk.js
2.73 KB build/static/css/5.b90ce945.chunk.css
2.73 KB build/static/css/7.b90ce945.chunk.css
2.6 KB build/static/js/5.c45b14eb.chunk.js
2.54 KB build/static/js/7.f5c95ed2.chunk.js
1.88 KB build/static/js/9.28000b0c.chunk.js
1.75 KB build/static/js/8.cd521c20.chunk.js
1.67 KB build/static/js/runtime-main.f9cf8873.js
1.22 KB build/static/js/10.056b824f.chunk.js
224 B build/static/js/14.7c35130c.chunk.js
224 B build/static/js/12.2041d5d7.chunk.js
222 B build/static/js/15.93f1aa85.chunk.js
216 B build/static/js/13.e5886685.chunk.js
141 B build/static/js/11.2369fc97.chunk.js
The project was built assuming it is hosted at /ATL-RENEGADES-WEBSITE/.
You can control this with the homepage field in your package.json.
The build folder is ready to be deployed.
To publish it at https://joswald123.github.io/ATL-RENEGADES-WEBSITE/ , run:
npm install --save-dev gh-pages
Add the following script in your package.json.
// ...
"scripts": {
// ...
"predeploy": "npm run build",
"deploy": "gh-pages -d build"
}
Then run:
npm run deploy
Find out more about deployment here:
bit.ly/CRA-deploy**
You may have to set the environmental variables for MLab, or Atlas, or however Database you're supporting in heroku as well. Perhaps by taking a look at your server file we could guide you through
Related
I'm having trouble deploying my React app with gh-pages since I moved my local directory from the main disk to a secondary disk on my laptop (I was running out of space).
Directory: https://github.com/jorislimonier/jorislimonier.github.io/
Here is the output of npm run deploy:
joris#joris-N751JK:/media/joris/projects/personal-website$ npm run deploy
> joris.limonier.github.io#0.1.0 predeploy
> npm run build
> joris.limonier.github.io#0.1.0 build
> react-scripts build
Creating an optimized production build...
warn - The `content` option in your Tailwind CSS configuration is missing or empty.
warn - Configure your content sources or your generated CSS will be missing styles.
warn - https://tailwindcss.com/docs/content-configuration
Compiled successfully.
File sizes after gzip:
75.73 kB build/static/js/main.27c91ea0.js
12.63 kB build/static/css/main.5cfc2ee1.css
The project was built assuming it is hosted at /.
You can control this with the homepage field in your package.json.
The build folder is ready to be deployed.
You may serve it with a static server:
npm install -g serve
serve -s build
Find out more about deployment here:
https://cra.link/deployment
> joris.limonier.github.io#0.1.0 deploy
> gh-pages -d build
Failed to get remote.origin.url (task must either be run in a git repository with a configured origin remote or must be configured with the "repo" option).
I tried:
git remote remove origin
git remote add origin https://github.com/jorislimonier/jorislimonier.github.io.git
Any idea?
i cannot fix this issue...
Terminal:
PS C:\Users\lenovo\Documents\reactProjects\linkedin-clone> npm run build
linkedin-clone#0.1.0 build
react-scripts build
Creating an optimized production build...
Compiled successfully.
File sizes after gzip:
226 kB build\static\js\main.0f7d0368.js
1.69 kB build\static\css\main.e40a2faa.css
The project was built assuming it is hosted at /.
You can control this with the homepage field in your package.json.
The build folder is ready to be deployed.
You may serve it with a static server:
serve -s build
Find out more about deployment here:
https://cra.link/deployment
I updated to the latest #servicestack/cli
npm install -g #servicestack/cli
+ #servicestack/cli#1.0.8
updated 5 packages in 5.862s
Ran the dotnet-new command:
C:\Projects\Personal> dotnet-new react-spa POETS
> uglifyjs-webpack-plugin#0.4.6 postinstall C:\Projects\Personal\POETS\POETS\node_modules\webpack\node_modules\uglifyjs-webpack-plugin
> node lib/post_install.js
> poets#0.1.0 postinstall C:\Projects\Personal\POETS\POETS
> npm run build
> poets#0.1.0 build C:\Projects\Personal\POETS\POETS
> rimraf wwwroot/ && react-scripts-ts build && (move build wwwroot || mv build wwwroot)
Creating an optimized production build...
Starting type checking and linting service...
Using 1 worker with 2048MB memory limit
ts-loader: Using typescript#3.2.4 and C:\Projects\Personal\POETS\POETS\tsconfig.prod.json
Compiled successfully.
File sizes after gzip:
80.72 KB build\static\js\main.5832e8d6.js
29.7 KB build\static\css\main.4df18a76.css
The project was built assuming it is hosted at the server root.
You can control this with the homepage field in your package.json.
For example, add this to build it for GitHub Pages:
"homepage" : "http://myname.github.io/myapp",
The build folder is ready to be deployed.
You may serve it with a static server:
npm install -g serve
serve -s build
1 dir(s) moved.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.7 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
added 1564 packages in 27.283s
MSBuild auto-detection: using msbuild version '16.0.360.33175' from 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\bin'.
Restoring packages for C:\Projects\Personal\POETS\POETS.ServiceInterface\POETS.ServiceInterface.csproj...
Restoring packages for C:\Projects\Personal\POETS\POETS.Tests\POETS.Tests.csproj...
Restoring packages for C:\Projects\Personal\POETS\POETS\POETS.csproj...
Restoring packages for C:\Projects\Personal\POETS\POETS.ServiceModel\POETS.ServiceModel.csproj...
GET https://api.nuget.org/v3-flatcontainer/servicestack.kestrel/index.json
GET https://api.nuget.org/v3-flatcontainer/servicestack/index.json
GET https://api.nuget.org/v3-flatcontainer/nunit/index.json
GET https://api.nuget.org/v3-flatcontainer/microsoft.net.test.sdk/index.json
GET https://api.nuget.org/v3-flatcontainer/nunit3testadapter/index.json
GET https://api.nuget.org/v3-flatcontainer/servicestack.interfaces/index.json
OK https://api.nuget.org/v3-flatcontainer/servicestack.kestrel/index.json 194ms
GET https://api.nuget.org/v3-flatcontainer/servicestack.kestrel/5.4.0/servicestack.kestrel.5.4.0.nupkg
OK https://api.nuget.org/v3-flatcontainer/nunit/index.json 237ms
OK https://api.nuget.org/v3-flatcontainer/microsoft.net.test.sdk/index.json 246ms
OK https://api.nuget.org/v3-flatcontainer/nunit3testadapter/index.json 248ms
OK https://api.nuget.org/v3-flatcontainer/servicestack.interfaces/index.json 263ms
GET https://api.nuget.org/v3-flatcontainer/servicestack.interfaces/5.4.0/servicestack.interfaces.5.4.0.nupkg
OK https://api.nuget.org/v3-flatcontainer/servicestack/index.json 318ms
GET https://api.nuget.org/v3-flatcontainer/servicestack/5.4.0/servicestack.5.4.0.nupkg
OK https://api.nuget.org/v3-flatcontainer/servicestack.kestrel/5.4.0/servicestack.kestrel.5.4.0.nupkg 162ms
OK https://api.nuget.org/v3-flatcontainer/servicestack.interfaces/5.4.0/servicestack.interfaces.5.4.0.nupkg 149ms
OK https://api.nuget.org/v3-flatcontainer/servicestack/5.4.0/servicestack.5.4.0.nupkg 151ms
Installing ServiceStack.Interfaces 5.4.0.
GET https://api.nuget.org/v3-flatcontainer/servicestack.client/index.json
GET https://api.nuget.org/v3-flatcontainer/servicestack.common/index.json
OK https://api.nuget.org/v3-flatcontainer/servicestack.client/index.json 158ms
GET https://api.nuget.org/v3-flatcontainer/servicestack.client/5.4.0/servicestack.client.5.4.0.nupkg
OK https://api.nuget.org/v3-flatcontainer/servicestack.common/index.json 173ms
GET https://api.nuget.org/v3-flatcontainer/servicestack.common/5.4.0/servicestack.common.5.4.0.nupkg
OK https://api.nuget.org/v3-flatcontainer/servicestack.client/5.4.0/servicestack.client.5.4.0.nupkg 148ms
OK https://api.nuget.org/v3-flatcontainer/servicestack.common/5.4.0/servicestack.common.5.4.0.nupkg 146ms
GET https://api.nuget.org/v3-flatcontainer/servicestack.text/index.json
OK https://api.nuget.org/v3-flatcontainer/servicestack.text/index.json 159ms
GET https://api.nuget.org/v3-flatcontainer/servicestack.text/5.4.0/servicestack.text.5.4.0.nupkg
OK https://api.nuget.org/v3-flatcontainer/servicestack.text/5.4.0/servicestack.text.5.4.0.nupkg 162ms
Committing restore...
Generating MSBuild file C:\Projects\Personal\POETS\POETS.ServiceModel\obj\POETS.ServiceModel.csproj.nuget.g.props.
Generating MSBuild file C:\Projects\Personal\POETS\POETS.ServiceModel\obj\POETS.ServiceModel.csproj.nuget.g.targets.
Writing lock file to disk. Path: C:\Projects\Personal\POETS\POETS.ServiceModel\obj\project.assets.json
Restore completed in 1.79 sec for C:\Projects\Personal\POETS\POETS.ServiceModel\POETS.ServiceModel.csproj.
Installing ServiceStack.Text 5.4.0.
Installing ServiceStack.Client 5.4.0.
Installing ServiceStack.Common 5.4.0.
Installing ServiceStack 5.4.0.
Installing ServiceStack.Kestrel 5.4.0.
Committing restore...
Generating MSBuild file C:\Projects\Personal\POETS\POETS.ServiceInterface\obj\POETS.ServiceInterface.csproj.nuget.g.props.
Generating MSBuild file C:\Projects\Personal\POETS\POETS.ServiceInterface\obj\POETS.ServiceInterface.csproj.nuget.g.targets.
Writing lock file to disk. Path: C:\Projects\Personal\POETS\POETS.ServiceInterface\obj\project.assets.json
Restore completed in 2.82 sec for C:\Projects\Personal\POETS\POETS.ServiceInterface\POETS.ServiceInterface.csproj.
Committing restore...
Generating MSBuild file C:\Projects\Personal\POETS\POETS.Tests\obj\POETS.Tests.csproj.nuget.g.props.
Generating MSBuild file C:\Projects\Personal\POETS\POETS.Tests\obj\POETS.Tests.csproj.nuget.g.targets.
Writing lock file to disk. Path: C:\Projects\Personal\POETS\POETS.Tests\obj\project.assets.json
Restore completed in 2.84 sec for C:\Projects\Personal\POETS\POETS.Tests\POETS.Tests.csproj.
Committing restore...
Generating MSBuild file C:\Projects\Personal\POETS\POETS\obj\POETS.csproj.nuget.g.props.
Generating MSBuild file C:\Projects\Personal\POETS\POETS\obj\POETS.csproj.nuget.g.targets.
Writing lock file to disk. Path: C:\Projects\Personal\POETS\POETS\obj\project.assets.json
Restore completed in 2.86 sec for C:\Projects\Personal\POETS\POETS\POETS.csproj.
NuGet Config files used:
C:\Projects\Personal\POETS\NuGet.Config
C:\Users\willi\AppData\Roaming\NuGet\NuGet.Config
C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.Offline.config
Feeds used:
C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\
https://api.nuget.org/v3/index.json
Installed:
1 package(s) to C:\Projects\Personal\POETS\POETS.ServiceModel\POETS.ServiceModel.csproj
5 package(s) to C:\Projects\Personal\POETS\POETS.ServiceInterface\POETS.ServiceInterface.csproj
6 package(s) to C:\Projects\Personal\POETS\POETS.Tests\POETS.Tests.csproj
5 package(s) to C:\Projects\Personal\POETS\POETS\POETS.csproj
Opened the App in Visual Studio 2017, and have a missing dependency for SharpPagesFeature.
public override void Configure(Container container)
{
Plugins.Add(new SharpPagesFeature()); // <--- Can't resolve this
SetConfig(new HostConfig
{
AddRedirectParamsToQueryString = true,
DebugMode = AppSettings.Get(nameof(HostConfig.DebugMode), false)
});
}
Does anyone know what package this is from? I see on GitHub that SharpPagesFeature is in the main namespace (ServiceStack).
EDIT
Additionally, the generated MyService.cs has incorrect dependencies and missing imports:
using ServiceStack.Script; <--- this can't be resolved and is unused
new PageResult(Request.GetPage("/")); <-- this requires me to import ServiceStack.Templates.PageResult (which resolves fine)
You have an old pre-release v5.4.1 of ServiceStack installed.
You'll need to clear your NuGet packages cache to install the latest version, e.g:
$ nuget locals all -clear
I'm trying to deploy a fresh React app made via Create-react-app to my Dokku on DigitalOcean thank to this heroku buildpacks. Following their instructions it ends up failing ...
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-static.git
=====> Detected Framework: Static HTML
remote: % Total % Received % Xferd Average Speed Time Time Time Current
remote: Dload Upload Total Spent Left Speed
remote: 100 838k 100 838k 0 0 514k 0 0:00:01 0:00:01 --:--:-- 514k
-----> Installed directory to /app/bin
Using release configuration from last framework (Static HTML).
remote: cat: /tmp/build/last_pack_release.out: input file is output file
--- {}
-----> Discovering process types
Procfile declares types ->
-----> Releasing justpushit-app (dokku/justpushit-app:latest)...
-----> Deploying justpushit-app (dokku/justpushit-app:latest)...
-----> Attempting to run scripts.dokku.predeploy from app.json (if defined)
-----> App Procfile file found (/home/dokku/justpushit-app/DOKKU_PROCFILE)
-----> DOKKU_SCALE file found (/home/dokku/justpushit-app/DOKKU_SCALE)
=====> web=1
-----> Attempting pre-flight checks
For more efficient zero downtime deployments, create a file CHECKS.
See http://dokku.viewdocs.io/dokku/deployment/zero-downtime-deploys/ for examples
CHECKS file not found in container: Running simple container check...
-----> Waiting for 10 seconds ...
remote: App container failed to start!!
=====> justpushit-app web container output:
Injecting runtime env into /app/build/static/js/main.060925d8.js (from .profile.d/inject_react_app_env.sh)
setuidgid: usage: setuidgid account child
=====> end justpushit-app web container output
To pantouflesdokku:justpushit-app
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'dokku#pantouflesdokku:justpushit-app'
Everything seems to work fine but the app is never launched. What am I missing here ?
Because I had the same problem I opened an issue for this specific build pack: https://github.com/mars/create-react-app-buildpack/issues/54 And luckily it's maintainer was kind enough to provide me with the correct Procfile content.
To fix this problem you should have a Procfile with the following line:
web: bin/boot
Instead of web: npm start this won't spawn a complete development server. So it should be a lot easier on your server's memory/cpu usage.
The solution was fairly simple. The whole build works but the application must be initialized somehow.
I added a Procfile and wrote the following line in it ...
web: npm start
Hope it helps.
after downloading and extracting psk1.2.1 and running npm install and bower install, when i run gulp i get the following output
MacBook-Pro-van-Marco:testb mspro$ gulp
[21:18:46] Using gulpfile ~/www/studies/polymer/testb/gulpfile.js
[21:18:46] Starting 'clean'...
[21:18:46] Finished 'clean' after 5.66 ms
[21:18:46] Starting 'default'...
[21:18:46] Starting 'copy'...
[21:18:46] Starting 'styles'...
[21:18:47] styles all files 98 B
[21:18:47] Finished 'styles' after 559 ms
[21:18:48] copy all files 12.75 MB
[21:18:48] Finished 'copy' after 1.72 s
[21:18:48] Starting 'elements'...
[21:18:48] Finished 'elements' after 3.49 ms
[21:18:48] Starting 'lint'...
[21:18:49] Starting 'images'...
[21:18:49] Starting 'fonts'...
[21:18:49] Starting 'html'...
[21:18:49] Finished 'fonts' after 142 ms
[21:18:51] Finished 'lint' after 2.41 s
[21:18:51] html all files 52.36 kB
[21:18:51] Finished 'html' after 1.35 s
[21:18:51] gulp-imagemin: Minified 6 images (saved 494 B - 1.4%)
[21:18:51] images all files 35.41 kB
[21:18:51] Finished 'images' after 1.64 s
[21:18:51] Starting 'vulcanize'...
ERROR finding /Users/mspro/www/studies/polymer/testb/dist/bower_components/paper-behaviors/paper-button-behavior.html
ERROR finding /Users/mspro/www/studies/polymer/testb/dist/bower_components/paper-behaviors/paper-inky-focus-behavior.html
the paper-behaviors folder was empty (except for the README.md)
i then copied the content of the bower_components/paper-behaviors folder of the psk-light download and the error was gone, but starting the demo with gulp resulted in an empty page
looking at the console in chrome i get following errors:
Uncaught TypeError: Polymer.IronMeta is not a function
/deep/ combinator is deprecated. See https://www.chromestatus.com/features/6750456638341120 for more details.
iron-icon.html:168 Uncaught TypeError: this._meta.byKey is not a function
page.js:797 Uncaught TypeError: Cannot read property 'length' of undefined
here's where i give up for now,
my node version is v4.2.4 on mac osx 10.10.5
Chrome 47.0.2526.106 (64-bit)
does anyone have a idea how to solve this problem?
thanks
It would be helpful to include the actual commands you ran and which version of the PSK you tried. Here are the steps I followed and was able to get the PSK installed and run gulp and gulp serve without error.
Download Polymer Starter Kit
Under Intermediate - Advanced Users click on polymer-starter-kit-1.2.1.zip
Extract ZIP file to preferred location
Install Node.js if needed before running the next step
With Node.js installed, run the following one liner from the root of your Polymer Starter Kit download:
npm install -g gulp bower && npm install && bower install
OR if admin permission is needed:
sudo npm install -g gulp bower && npm install && bower install
NOTE: This step takes a few minutes to install all of the dependencies.
Then start the web server using this one liner from the root of your Polymer Starter Kit download:
gulp serve