ctrlplusb / react-universally

A starter kit for universal react applications.
MIT License
1.7k stars 244 forks source link

Deploy Problem #500

Closed jlieb10 closed 6 years ago

jlieb10 commented 6 years ago

As the others have described, the deploy command is not working. Is there a fix coming out for this and or there other ways to easily deploy this?

ctrlplusb commented 6 years ago

Hi, I think this may have been due to the fact that there was both a package-lock.json and yarn.lock file, because I deleted the yarn.lock and tried a deploy and it worked perfect for me. Can you pull the latest master and try again?

ctrlplusb commented 6 years ago

See example deploy from latest master:

https://react-universally-nrweslbfdr.now.sh

jlieb10 commented 6 years ago

@ctrlplusb thanks for the quick help! working for me now at react-universally-kljtoxzaxs.now.sh

designspin commented 6 years ago

I am still having problems here, can anyone help?

Still seeing babel-node not found, I tried removing yarn.lock as suggested before running the deploy.

npm install 10/11 10:21 AM (6m) ✓ Using "package-lock.json" ⧗ Installing 105 main dependencies… 10/11 10:21 AM (6m) ✓ Installed 1 module [910ms] 10/11 10:21 AM (6m)

react-universally@13.0.0 preinstall /home/nowuser/src node internal/scripts/preinstall 10/11 10:21 AM (6m) npm run build 10/11 10:22 AM (6m) npm WARN lifecycle The node binary used for scripts is /home/nowuser/bin/node but npm is using /usr/bin/node itself. Use the --scripts-prepend-node-path option to include the path for the node binary npm was executed with. 10/11 10:22 AM (6m)

react-universally@13.0.0 build /home/nowuser/src babel-node internal/scripts/build --optimize 10/11 10:22 AM (6m) sh: babel-node: not found 10/11 10:22 AM (6m) npm ERR! file sh 10/11 10:22 AM (6m) npm ERR! code ELIFECYCLE 10/11 10:22 AM (6m) npm ERR! errno ENOENT npm ERR! syscall spawn 10/11 10:22 AM (6m) npm ERR! react-universally@13.0.0 build: babel-node internal/scripts/build --optimize 10/11 10:22 AM (6m) npm ERR! spawn ENOENT npm ERR! 10/11 10:22 AM (6m) npm ERR! Failed at the react-universally@13.0.0 build script. 10/11 10:22 AM (6m) npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 10/11 10:22 AM (6m)

npm ERR! A complete log of this run can be found in: 10/11 10:22 AM (6m) npm ERR! /home/nowuser/.npm/_logs/2017-10-11T09_22_00_302Z-debug.log

ctrlplusb commented 6 years ago

@designspin could you please try remove your package-lock.json and then rebuild it via npm install?

designspin commented 6 years ago

@ctrlplusb Hey thanks, I got it to deploy. But my code does not run, but that is not your problem. I am a bit green, so will need to do some more research I think!

It's annoying that my code runs locally but now hates me :)

https://zeit.co/jaymonkey77/design-spin-web/cauldhnrqx/logs

kirandeep123 commented 6 years ago

I ran this command and getting issues to deploy it to ZEIT now .can you please suggest something ? I deleted packgage-lock.json from my project as well .

ns ./build --cmd 'list ./content -s'

/usr/local/lib/node_modules/now-serve/dist/bin/ns:113 throw err; ^

Error: Could not get a unique tmp filename, max tries reached at _getTmpNameSync (/usr/local/lib/node_modules/now-serve/node_modules/tmp/lib/tmp.js:197:9) at Object._createTmpDirSync [as dirSync] (/usr/local/lib/node_modules/now-serve/node_modules/tmp/lib/tmp.js:327:14) at Object. (/usr/local/lib/node_modules/now-serve/dist/bin/ns:103:26) at Module._compile (module.js:624:30) at Object.Module._extensions..js (module.js:635:10) at Module.load (module.js:545:32) at tryModuleLoad (module.js:508:12) at Function.Module._load (module.js:500:3) at Function.Module.runMain (module.js:665:10) at startup (bootstrap_node.js:187:16) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! cotd@0.0.1 deploy: ns ./build --cmd 'list ./content -s' npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the cotd@0.0.1 deploy script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /Users/kirandeepkaur/.npm/_logs/2017-10-19T06_08_00_952Z-debug.log