next.js icon indicating copy to clipboard operation
next.js copied to clipboard

with-prefetching example not working on Windows.

Open bestwestern opened this issue 9 years ago • 9 comments

I cloned the project, npm install in 'examples\with-prefetching', npm run dev and I get:

Module build failed: ReferenceError: Unknown plugin "transform-async-to-generator"

bestwestern avatar Dec 21 '16 08:12 bestwestern

You'll need to link the local repo as well into the example.

Inside master local repo npm install npm link

cd examples\with-prefetching npm i npm link next

and you should be good!

FrancosLab avatar Dec 21 '16 08:12 FrancosLab

Thanks @FrancosLab. I think when we do npm install, it might not installing the beta versions. I'll check what we can do about it.

And having a hacking guide it pretty useful.

arunoda avatar Dec 21 '16 11:12 arunoda

Thanks - it helped - but now I get 'This dependency was not found in node_modules:

  • next/prefetch Did you forget to run npm install --save for it

bestwestern avatar Dec 21 '16 15:12 bestwestern

I hope now everything will work fine. See: https://github.com/zeit/next.js/tree/master/examples/with-prefetching

arunoda avatar Dec 24 '16 19:12 arunoda

It's still a problem. I tried creating VirtualBox with Ubuntu, installed Node, and then curl https://codeload.github.com/zeit/next.js/tar.gz/master | tar -xz --strip=2 next.js-master/examples/with-prefetching

cd with-prefetching Then npm install npm run dev

But I still got this error: next/prefetch Did you forget to run npm install --save for it

bestwestern avatar Dec 25 '16 22:12 bestwestern

@bestwestern re-opening it. Thanks for the repro instructions, sorry for the issue!

rauchg avatar Dec 25 '16 22:12 rauchg

Still having this issue. After running yarn add next/prefetch

thebetterjort avatar Jan 09 '17 17:01 thebetterjort

@thebetterjort You need to add ^2.0.0-beta to the next field in package.json dependency. Then you need to do yarn upgrade

arunoda avatar Jan 09 '17 18:01 arunoda

Thanks resolved.

thebetterjort avatar Jan 09 '17 19:01 thebetterjort