Closed sinisterstumble closed 4 years ago
Hi there - any chance you're using an older version of npm? This repo requires npm 6.
npm 6.13.4 same issue
No issue with node 13.11.0 and npm 6.13.7
Interesting ;) Broken for me with
~/nextjs-preact-demo $ npm -v ¡
6.14.3
~/nextjs-preact-demo $ node -v
v13.6.0
Can you also provide the version of Preact you have installed locally? (npm ls preact
)
I'm seeing valid export maps for ./compat
, not sure what else could be going wrong here.
I have no idea what changed but its building correctly now. Did same exact steps:
git clone https://github.com/developit/nextjs-preact-demo.git
cd nextjs-preact-demo
npm i
npm run build
~/d/nextjs-preact-demo $ npm -v
6.14.3
~/d/nextjs-preact-demo $ node -v
v13.6.0
~/d/nextjs-preact-demo $ npm ls preact
nextjs-preact-demo@1.0.0 /Users/l5x/devel/nextjs-preact-demo
└── preact@10.2.1
Ignore the previous message. I forgot to upgrade next. This is the steps:
git clone https://github.com/developit/nextjs-preact-demo.git
cd nextjs-preact-demo
ncu -u
npm i
npm run build
~/d/nextjs-preact-demo $ npm ls preact
nextjs-preact-demo@1.0.0 /Users/l5x/devel/nextjs-preact-demo
└── preact@10.3.4
~/d/nextjs-preact-demo $ npm ls next
nextjs-preact-demo@1.0.0 /Users/l5x/devel/nextjs-preact-demo
└── next@9.3.1
I just opened a PR with the dep upgrades (#6), and testing on Gitpod I can't reproduce:
$ node -v
v13.11.0
$ npm -v
6.13.7
$ npm ls --depth 0
nextjs-preact-demo@1.0.0 /workspace/nextjs-preact-demo
├── next@9.3.1
├── preact@10.3.4
├── preact-render-to-string@5.1.4
├── UNMET PEER DEPENDENCY react@1.0.0 (github:preact-compat/react#acfe2cc2acc677d08fb8edf8ce04796634d8edf8)
├── UNMET PEER DEPENDENCY react-dom@1.0.0 (github:preact-compat/react-dom#75804a834f55de5350c175f9646631dabac258ae)
└── react-ssr-prepass@npm:preact-ssr-prepass@1.0.1
npm ERR! peer dep missing: react@^16.6.0, required by next@9.3.1
npm ERR! peer dep missing: react-dom@^16.6.0, required by next@9.3.1
npm ERR! peer dep missing: react@15.x.x || 16.x.x, required by styled-jsx@3.2.5
npm ERR! peer dep missing: react@^16.8.0, required by use-subscription@1.1.1
@l5x my guess is that you're using npm-check-updates
to perform the update, which does not support npm aliases. That means when you run ncu -u
, you're installing React instead of Preact.
I've just merged the 9.3.1 update to master. If you pull from master and do a fresh npm install
I'm confident it will work for you.
I'm going to close this out since I think ncu
is the culprit and that's just their bug. Let me know if it's still an issue with the above process and we can re-open.
No issue in a clean centos/8 vagrant box. But still failing locally on macos.
@developit thank you!
I will reinstall nvm/node and report back with results, may help @pronevich.