Closed bestwestern closed 4 years ago
You need to be running npm 6+.
If you can't upgrade to npm 6, open the package.json
in your nextjs-preact-demo
folder and change these lines:
{
"name": "nextjs-preact-demo",
"version": "1.0.0",
"scripts": {
"dev": "next",
"build": "next build && next export -o build",
"start": "NODE_ENV=production next start"
},
"dependencies": {
"next": "^9.3.1",
"preact": "^10.3.4",
"preact-render-to-string": "^5.1.4",
+ "preact-ssr-prepass": "^1.0.1",
"react": "github:preact-compat/react#1.0.0",
"react-dom": "github:preact-compat/react-dom#1.0.0",
- "react-ssr-prepass": "npm:preact-ssr-prepass@^1.0.1"
+ "react-ssr-prepass": "gist:6759f670713"
},
"license": "UNLICENSE"
}
If this works it might be worth using it instead of npm aliases.
Awesome. Thanks. That's quite a trim of next.js!
I did git clone https://github.com/developit/nextjs-preact-demo.git
cd nextjs-preact-demo
npm i
Then I got:
npm ERR! Invalid dependency type requested: alias