Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Tutorial does not work #1333

Closed
SteffRainville opened this issue Jul 22, 2020 · 10 comments · Fixed by #1338
Closed

Tutorial does not work #1333

SteffRainville opened this issue Jul 22, 2020 · 10 comments · Fixed by #1338

Comments

@SteffRainville
Copy link

SteffRainville commented Jul 22, 2020

Describe the bug
Tried the LEARN sapper path found at https://sapper.svelte.dev/docs/

npx degit "sveltejs/sapper-template#rollup" my-app
or: npx degit "sveltejs/sapper-template#webpack" my-app
cd my-app
npm install
npm run dev

Went to localhost:3000 and got

500
Cannot read property 'map' of undefined

TypeError: Cannot read property 'map' of undefined
at load_component (http://localhost:3000/client/client.6eb8927e.js:2093:75)
at http://localhost:3000/client/client.6eb8927e.js:2044:50
at Array.map ()
at hydrate_target (http://localhost:3000/client/client.6eb8927e.js:2028:42)
at navigate (http://localhost:3000/client/client.6eb8927e.js:1894:3)
at handle_click (http://localhost:3000/client/client.6eb8927e.js:2211:3)

The OR path of the tutorial seem to work
npx degit "sveltejs/sapper-template#webpack" my-app

Windows 10 64 bit
Node v14.5.0

@benmccann
Copy link
Member

I just tried and it worked fine for me on Ubuntu and Node 12.

@SteffRainville
Copy link
Author

Just tested on Mac 10.15.6 with node 14.5.0 and it works so the problem seems to be limited to Windows

@nickolasgregory
Copy link

nickolasgregory commented Jul 23, 2020

Working OK for me (rollup) on

  • Windows 10 64 bit
  • Node v12.18.3

@antony
Copy link
Member

antony commented Jul 23, 2020

Working ok for me on Ubuntu 20.04
Node v14

  • by the way, we strongly encourage the rollup version, not the webpack version, since we are better placed to help with issues.

@SteffRainville
Copy link
Author

Different message this morning on a different Windows 10 computer using node 14.6.0

c:\TMP>npx degit "sveltejs/sapper-template#rollup" my-app
npx: installed 1 in 2.407s
! could not fetch remote https://github.com/sveltejs/sapper-template
! could not find commit hash for rollup

c:\TMP>npx degit "sveltejs/sapper-template#webpack" my-app
npx: installed 1 in 2.602s
! could not fetch remote https://github.com/sveltejs/sapper-template
! could not find commit hash for webpack

@antony
Copy link
Member

antony commented Jul 23, 2020

I feel like that is a degit issue when git is not configured/authenticated/set up for ssh.

See Rich-Harris/degit#37

@SteffRainville
Copy link
Author

Confirmed ! The could not fetch issue was git related.

@SteffRainville
Copy link
Author

Since it worked on another computer I upgraded to node 14.6.0 and npm cache clean -force and now the rollup version works.

@Shackless
Copy link

I have the same problem on my laptop. Upgraded from Node 12 to Node 14.6.0 and cleaned the npm cache but that didn't fix it. I have another Windows PC running the same version of Node 12 as before on my laptop and that works fine.
In Firefox, you get slighty more information on the error than in Chrome which brought me to #1256. This seems to be the same error.

@benmccann
Copy link
Member

I sent a fix for this issue: #1338

Thanks to @Shackless for remote debugging this with me!

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

Successfully merging a pull request may close this issue.

5 participants