Skip to content
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

How push to cloud (using now.sh) #46

Closed
FMGordillo opened this issue Jan 17, 2018 · 4 comments
Closed

How push to cloud (using now.sh) #46

FMGordillo opened this issue Jan 17, 2018 · 4 comments

Comments

@FMGordillo
Copy link

FMGordillo commented Jan 17, 2018

I struggled a lot to make this work, but I get issues regarding 'build' script.

Using only the example:

> ...
> Using Node.js 8.9.4 (requested: `8.x.x`)
> Ready! ... [10s]
> Synced 13 files (286.97KB) [0ms]
> Initializing…
> Building
> ▲ npm install
> ✓ Using "package-lock.json"
> ⧗ Installing 5 main dependencies…
> ✓ Installed 1465 modules [56s]
> ▲ npm run build
> > xxxx-xxx-xxxx@0.1.0 build /home/nowuser/src
> > after build
> Failed to compile.
> ENOENT: no such file or directory, stat '/home/nowuser/src/public'
> npm ERR! code ELIFECYCLE
> npm ERR! errno 1
> npm ERR! xxx-xxx-xxx@0.1.0 build: `after build`
> npm ERR! Exit status 1
> npm ERR!
> npm ERR! Failed at the xxxx-xxx-xxxx@0.1.0 build 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!     /home/nowuser/.npm/_logs/2018-01-17T03_42_56_496Z-debug.log
> Error! The build step of your project failed. To retry, run `now --force`.

I've tried adding and excluding folder '/build' in .gitignore but the results are very different with each deploy. Any advice?

@jaredpalmer
Copy link
Owner

Do you have a public directory?

@FMGordillo
Copy link
Author

FMGordillo commented Jan 17, 2018

Yup

total 816
drwxr-xr-x    4 facundogordillo  staff     128 Jan 16 09:58 build
-rw-r--r--    1 facundogordillo  staff     162 Jan 16 10:22 manifest.yml
drwxr-xr-x  930 facundogordillo  staff   29760 Jan 16 09:58 node_modules
-rw-r--r--    1 facundogordillo  staff  406893 Jan 16 09:39 package-lock.json
-rw-r--r--    1 facundogordillo  staff     511 Jan 16 10:12 package.json
drwxr-xr-x    3 facundogordillo  staff      96 Jan 16 10:38 public
drwxr-xr-x    5 facundogordillo  staff     160 Jan 16 09:36 src

and It has an empty favicon.ico file inside.

@jaredpalmer
Copy link
Owner

must be an issue with paths during the build script. let me take a look

@jaredpalmer
Copy link
Owner

Just tested. https://after-examples-basic-rwlvfhzyvl.now.sh/

Make sure you are on the latest version of after.js 0.5.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants