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

Missing site_id when creating a new site from deploy #163

Closed
bcomnes opened this issue Oct 25, 2018 · 6 comments · Fixed by #165
Closed

Missing site_id when creating a new site from deploy #163

bcomnes opened this issue Oct 25, 2018 · 6 comments · Fixed by #165

Comments

@bcomnes
Copy link
Contributor

bcomnes commented Oct 25, 2018

Site Created

Admin URL: https://app.netlify.com/sites/gracious-nightingale-53c370
URL:       https://gracious-nightingale-53c370.netlify.com
Site ID:   ad110683-f120-4bbe-ae6c-4d492ec13c1f

Please provide a deploy path relative to:
/Users/bret/netlify/test-deploy-site
? deploy path /Users/bret/netlify/test-deploy-site/dist
Deploy path: /Users/bret/netlify/test-deploy-site/dist
Deploying to draft url...
✔ Finished hashing 54 files
▌ CDN diffing files...Error: Missing required param site_id
    at Object.values.forEach.param (/usr/local/lib/node_modules/netlify-cli/node_modules/netlify/src/open-api/index.js:32:15)
    at Array.forEach (<anonymous>)
    at NetlifyAPI.createSiteDeploy (/usr/local/lib/node_modules/netlify-cli/node_modules/netlify/src/open-api/index.js:27:43)
    at module.exports (/usr/local/lib/node_modules/netlify-cli/node_modules/netlify/src/deploy/index.js:75:26)
bret-netlify:test-deploy-site bret$ netlify deploy
Please provide a deploy path relative to:
/Users/bret/netlify/test-deploy-site
? deploy path /Users/bret/netlify/test-deploy-site/dist
Deploy path: /Users/bret/netlify/test-deploy-site/dist
Deploying to draft url...
✔ Finished hashing 54 files
✔ CDN requesting 0 files
✔ Finished uploading 0 assets
✔ Draft deploy is live!

Logs:           https://app.netlify.com/sites/gracious-nightingale-53c370/deploys/5bd207c867610c04aa0c1b66
Live Draft Url: https://5bd207c867610c04aa0c1b66--gracious-nightingale-53c370.netlify.com

If everything looks good on your draft URL. Take it live with the --prod flag
netlify deploy --prod


@fernandogruning
Copy link

Same here

@bcomnes
Copy link
Contributor Author

bcomnes commented Oct 27, 2018

Work around is to retry the previous command. I have a fix in the works.

@bcomnes
Copy link
Contributor Author

bcomnes commented Oct 29, 2018

🎉netlify-cli@2.1.3🎉

@XhmikosR
Copy link
Contributor

@bcomnes this is still an issue. It happens every time I link to an existent site and I always have to rerun the command.

C:\Users\xmr\Desktop\foo>netlify --version
netlify-cli/2.6.1 win32-x64 node-v10.15.0

C:\Users\xmr\Desktop\foo>npm run netlify:deploy

> foo@1.0.0 netlify:deploy C:\Users\xmr\Desktop\foo
> netlify deploy --prod -d _site/

This folder isn't linked to a site yet
? What would you like to do? ⇄  Link this directory to an existing site

netlify link will connect a site in app.netlify.com to this folder

? How do you want to link this folder to a site? Site Name
? What is the name of the site? foobar

Directory Linked

Admin url: https://app.netlify.com/sites/foobar
Site url:  https://foobar.netlify.com

Site id saved to C:\Users\xmr\Desktop\foo/.netlify/state.json

You can now run other `netlify` cli commands in this directory
Deploy path: C:\Users\xmr\Desktop\foo\_site
Deploying to live site URL...
√ Finished hashing 230 files
- CDN diffing files...Error: Missing required param site_id
    at Object.values.forEach.param (C:/Users/xmr/AppData/Roaming/npm/node_modules/netlify-cli/node_modules/netlify/src/open-api/index.js:32:15)
    at Array.forEach (<anonymous>)
    at NetlifyAPI.createSiteDeploy (C:/Users/xmr/AppData/Roaming/npm/node_modules/netlify-cli/node_modules/netlify/src/open-api/index.js:27:43)
    at module.exports (C:/Users/xmr/AppData/Roaming/npm/node_modules/netlify-cli/node_modules/netlify/src/deploy/index.js:75:26)
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! foo@1.0.0 netlify:deploy: `netlify deploy --prod -d _site/`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the foo@1.0.0 netlify: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!     C:\Users\xmr\AppData\Roaming\npm-cache\_logs\2019-01-10T09_57_57_739Z-debug.log

C:\Users\xmr\Desktop\foo>npm run netlify:deploy

> foo@1.0.0 netlify:deploy C:\Users\xmr\Desktop\foo
> netlify deploy --prod -d _site/

Deploy path: C:\Users\xmr\Desktop\foo\_site
Deploying to live site URL...
√ Finished hashing 230 files
√ CDN requesting 13 files
√ Finished uploading 13 assets
√ Deploy is live!

Logs:              https://app.netlify.com/sites/foobar/deploys/XXX
Unique Deploy URL: https://XXX--foobar.netlify.com
Live URL:          https://foobar.netlify.com

Also note there's a minor issue with the PATH since I'm on Windows Site id saved to C:\Users\xmr\Desktop\foo/.netlify/state.json not sure if this has something to do with the issue.

@math0ne
Copy link

math0ne commented Mar 12, 2019

I'm still getting this on first run, and for me the deploy fails completely.

You can now run other `netlify` cli commands in this directory
Deploy path: /home/ubuntu/build-source/_site
Deploying to draft URL...
✔ Finished hashing 9574 files
🌍  CDN diffing files... ›   Warning:
 ›   {}
 ›
Error: Missing required param site_id
    at Object.values.forEach.param (/usr/local/lib/node_modules/netlify-cli/node_modules/netlify/src/open-api/index.js:34:15)
    at Array.forEach (<anonymous>)
    at NetlifyAPI.createSiteDeploy (/usr/local/lib/node_modules/netlify-cli/node_modules/netlify/src/open-api/index.js:28:43)
    at module.exports (/usr/local/lib/node_modules/netlify-cli/node_modules/netlify/src/deploy/index.js:75:26)
    at <anonymous>

@XhmikosR
Copy link
Contributor

@math0ne it did happen for me too, see #212, but after a few updates some time ago the issue went away.

You should make a new issue with all the info if it still happens on your system.

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

Successfully merging a pull request may close this issue.

4 participants