dillonkearns / elm-pages-starter

Starter blog for elm-pages
https://elm-pages-starter.netlify.com
95 stars 41 forks source link

Error running `npm install` #32

Closed tsukinoko-kun closed 1 year ago

tsukinoko-kun commented 1 year ago

NPM v8.16.0 Node v18.7.0 MacBook Pro 13" 2022 (ARM64, M2 Processor)

I get the following error when running npm install:

npm ERR! code 1
npm ERR! path /Users/frankmayer/Documents/Git/personal-website/node_modules/sharp
npm ERR! command failed
npm ERR! command sh /var/folders/80/_rnh3dk57bs66syjpvl1y5rc0000gn/T/install-ada2e7c5.sh
npm ERR! info sharp Using cached /Users/frankmayer/.npm/_libvips/libvips-8.9.1-darwin-x64.tar.gz
npm ERR! gyp ERR! configure error 
npm ERR! gyp ERR! stack Error: Command failed: /opt/homebrew/bin/python3 -c import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack   File "<string>", line 1
npm ERR! gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
npm ERR! gyp ERR! stack SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
npm ERR! gyp ERR! stack 
npm ERR! gyp ERR! stack     at ChildProcess.exithandler (node:child_process:410:12)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack     at maybeClose (node:internal/child_process:1091:16)
npm ERR! gyp ERR! stack     at Socket.<anonymous> (node:internal/child_process:449:11)
npm ERR! gyp ERR! stack     at Socket.emit (node:events:513:28)
npm ERR! gyp ERR! stack     at Pipe.<anonymous> (node:net:757:14)
npm ERR! gyp ERR! System Darwin 22.1.0
npm ERR! gyp ERR! command "/Users/frankmayer/.nvm/versions/node/v18.7.0/bin/node" "/Users/frankmayer/Documents/Git/personal-website/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /Users/frankmayer/Documents/Git/personal-website/node_modules/sharp
npm ERR! gyp ERR! node -v v18.7.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/frankmayer/.npm/_logs/2022-12-22T14_24_36_294Z-debug-0.log

2022-12-22T14_24_36_294Z-debug-0.log

dillonkearns commented 1 year ago

Try elm-pages v2 (or the v3 beta here: https://github.com/dillonkearns/elm-pages-3-alpha-starter). elm-pages v2 has a command elm-pages init to start a new project.