Giter Site home page Giter Site logo

Comments (11)

MuddyBootsCode avatar MuddyBootsCode commented on June 6, 2024

Have any logs? Error messages?

from grand-stack-starter.

james-cohen avatar james-cohen commented on June 6, 2024

Also having the same issue. Builds fine for local host but repeatedly get the following error log when trying to deploy on Now:

18:59:49.561
Downloading 16 deployment files...
18:59:50.488
Installing build runtime...
18:59:50.962
Build runtime installed: 474.353ms
18:59:51.300
Looking up build cache...
18:59:51.330
Build cache not found
18:59:51.671
Installing dependencies...
19:00:01.930

[email protected] install /zeit/1b71e73a/node_modules/husky
19:00:01.930
node husky install
19:00:02.038
husky > setting up git hooks
19:00:02.040
Can't find .git, skipping Git hooks installation.
19:00:02.040
Please check that you're in a cloned repository or run 'git init' to create an empty Git repository and reinstall husky.
19:00:02.075
[email protected] postinstall /zeit/1b71e73a/node_modules/@babel/runtime-corejs2/node_modules/core-js
19:00:02.075
node -e "try{require('./postinstall')}catch(e){}"
19:00:02.127
�[96mThank you for using core-js (�[94m https://github.com/zloirock/core-js �[96m) for polyfilling JavaScript standard library!�[0m
19:00:02.127
�[96mThe project needs your help! Please consider supporting of core-js on Open Collective or Patreon: �[0m
19:00:02.127
�[96m>�[94m https://opencollective.com/core-js �[0m
19:00:02.127
�[96m>�[94m https://www.patreon.com/zloirock �[0m
19:00:02.127
�[96mAlso, the author of core-js (�[94m https://github.com/zloirock �[96m) is looking for a good job -)�[0m
19:00:02.146
[email protected] postinstall /zeit/1b71e73a/node_modules/core-js
19:00:02.146
node scripts/postinstall || echo "ignore"
19:00:02.195
�[96mThank you for using core-js (�[94m https://github.com/zloirock/core-js �[96m) for polyfilling JavaScript standard library!�[0m
19:00:02.195
�[96mThe project needs your help! Please consider supporting of core-js on Open Collective or Patreon: �[0m
19:00:02.195
�[96m>�[94m https://opencollective.com/core-js �[0m
19:00:02.195
�[96m>�[94m https://www.patreon.com/zloirock �[0m
19:00:02.195
�[96mAlso, the author of core-js (�[94m https://github.com/zloirock �[96m) is looking for a good job -)�[0m
19:00:02.242
[email protected] postinstall /zeit/1b71e73a/node_modules/protobufjs
19:00:02.242
node scripts/postinstall
19:00:02.352
[email protected] postinstall /zeit/1b71e73a/node_modules/nodemon
19:00:02.352
node bin/postinstall || exit 0
19:00:02.422
�[32mLove nodemon? You can now support the project via the open collective:�[22m�[39m
19:00:02.422
�[96m�[1mhttps://opencollective.com/nodemon/donate�[0m
19:00:02.916
npm WARN [email protected] No repository field.
19:00:02.916
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
19:00:02.917
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
19:00:02.917
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/nodemon/node_modules/fsevents):
19:00:02.917
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
19:00:02.920
added 790 packages from 421 contributors in 10.905s
19:00:03.210
1 package is looking for funding
19:00:03.210
run npm fund for details
19:00:03.234
Running "npm run now-build"
19:00:03.419
[email protected] now-build /zeit/1b71e73a
19:00:03.419
babel src -d build && shx cp .env build && shx cp src/schema.graphql build
19:00:03.721
src/graphql-schema.js -> build/graphql-schema.js
19:00:03.744
src/index.js -> build/index.js
19:00:03.761
src/seed/seed-db.js -> build/seed/seed-db.js
19:00:03.776
src/seed/seed-mutations.js -> build/seed/seed-mutations.js
19:00:03.855
cp: no such file or directory: .env
19:00:03.859
npm ERR! code ELIFECYCLE
19:00:03.860
npm ERR! errno 1
19:00:03.860
npm ERR! [email protected] now-build: babel src -d build && shx cp .env build && shx cp src/schema.graphql build
19:00:03.860
npm ERR! Exit status 1
19:00:03.861
npm ERR!
19:00:03.861
npm ERR! Failed at the [email protected] now-build script.
19:00:03.861
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
19:00:03.865
npm ERR! A complete log of this run can be found in:
19:00:03.865
npm ERR! /zeit/.npm/_logs/2020-03-17T02_00_03_861Z-debug.log
19:00:03.876
Error: Exited with 1
19:00:03.876
at ChildProcess. (/zeit/ab5350c9de262234/.build-utils/.builder/node_modules/@now/static-build/dist/index.js:33891:24)
19:00:03.876
at ChildProcess.emit (events.js:223:5)
19:00:03.876
at ChildProcess.EventEmitter.emit (domain.js:475:20)
19:00:03.876
at maybeClose (internal/child_process.js:1021:16)
19:00:03.876
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
19:00:03.967
worker exited with code 20 and signal null
19:00:05.279
Done with "package.json"

Looked everywhere and can't find a fix so if anyone can help would be very grateful.

from grand-stack-starter.

MattGyverLee avatar MattGyverLee commented on June 6, 2024

I would really like to be able to deploy this to see what I am missing in my own project. Looking above, @james-cohen is getting the same error I was, and it happens whether or not you have committed your .env file to GIT (and typically, you shouldn't).

see vercel/vercel#2527

cp: no such file or directory: .env

I couldn't figure out why Zeit was running build instead of now-build, or why zeit was expecting a .env file in the repo.

I ended up working around this by removing the copy env command from build, and creating a "local-build" option that had it.

from grand-stack-starter.

debugpoint136 avatar debugpoint136 commented on June 6, 2024

@MattGyverLee can you elaborate on how you did the "local-build" option?

from grand-stack-starter.

MattGyverLee avatar MattGyverLee commented on June 6, 2024

@MattGyverLee can you elaborate on how you did the "local-build" option?

TL;DR _ _
Initially, I suspected Now was using "build" instead of "now-build", so i copied "build" in package.json to "local-build" and removed the copying of .env from "build" and "now-build". Then I worked with now-dotenv https://www.npmjs.com/package/now-dotenv to copy my production env variables to zeit. (Note: now-dotenv still requires a name value in now.json which is now deprecated)
_ _

Looking for a minimal fix to the template, it turned out to be simpler than that as now was using now-build, so I submitted the pull request #58 with a fix. You need to fill in your now.json with @ variables and update Zeit's secrets with everything you might need (client and server) since .env is no longer copied to Zeit.

The package.json now has:

"build": "babel src -d build && shx cp .env build && shx cp src/schema.graphql build",
"now-build": "babel src -d build && shx cp src/schema.graphql build",

And now.json has all my secrets, client and server.

I realize the world fell apart in the meantime (I successfully presented my prototype based on grandstack last week to my team via Zeit Now with my fix), but so far no traction on my pull request.

from grand-stack-starter.

MattGyverLee avatar MattGyverLee commented on June 6, 2024

@johnymontana Can we close this based on #58 ?

from grand-stack-starter.

jonomacx avatar jonomacx commented on June 6, 2024

@MattGyverLee
Hi, beginner here, I was also encountering the above issue, I've updated the package.json with your new now-build line, updated the now.json file with the neo4j URI, user and password details, however I'm unsure what secrets I am to include?

The build process has now moved on from the error above to reporting Missing Public Folder (I had ran now from the api directory as per Will Lyons youtube video). If I remove the now.json file and redeploy, should I override the "Output Directory" to prevent it defaulting to Public, or will the issue be resolved with the correct secrets listed?
Thank you for any help!

from grand-stack-starter.

MattGyverLee avatar MattGyverLee commented on June 6, 2024

My edits have been merged into the main branch, so the template should build properly locally or with Now if the secrets are set. See package.json and now.json after #58 and compare it to what you have.
I'm no expert here, but I believe the API doesn't need a Public folder, and UI-React contains one. You need to run both the API and one of the clients to use the system. I haven't tested the Angular UI, so I know nothing about it.

As far as secrets, anything needed in your .env files must now be mentioned in your now.json, either given explicitly as in the paths, or by configuring Now secrets for secret credentials. At minimum you need to teach Now the secrets below to run the starter...basically anything in your now.json that is not included explicitly.
NEO4J_URI
NEO4J_USER
NEO4J_PASSWORD

Now seems to be encouraging the structure with an API folder and a UI folder now, just like the template. If build is complaining about missing folders, Without seeing your code, I don't think your current problem is related to secrets, it sounds more like a package.json config issue and a missing folder.

from grand-stack-starter.

jonomacx avatar jonomacx commented on June 6, 2024

Thank you for following up so promptly. I've re-downloaded and started from scratch and still encountering the same issue with Vercel/Now. Think I will skip this hosting part and carry on learning the graphql and react ui bits which is what I came here for anyway!

from grand-stack-starter.

jonomacx avatar jonomacx commented on June 6, 2024

If anyone else is reading this:
Reason for failure was because I was following Wills youtube video step by step. He had deployed the API piece to Now, (which is where it was failing for me), but I hadn't followed the video to the natural end where he also deploys the UI piece to Now as well.

from grand-stack-starter.

MattGyverLee avatar MattGyverLee commented on June 6, 2024

@jonomacx Yes, I followed both, and there is a significant divergence between the video and the starter.
This video was helpful for me: https://www.youtube.com/watch?v=pRbQcy9f5ew&t=383s

from grand-stack-starter.

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.