You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SyntaxError: Unexpected token {
at new Script (vm.js:51:7)
at createScript (vm.js:136:10)
at Object.runInThisContext (vm.js:197:10)
at Module._compile (module.js:626:28)
at Object.Module._extensions..js (module.js:673:10)
at Module.load (module.js:575:32)
at tryModuleLoad (module.js:515:12)
at Function.Module._load (module.js:507:3)
at Module.require (module.js:606:17)
at require (internal/module.js:11:18)
npm verb lifecycle sharp@0.32.6install: unsafe-perm in lifecycle true
npm verb lifecycle sharp@0.32.6install: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/pi/node_modules/sharp/node_modules/.bin:/home/pi/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
npm verb lifecycle sharp@0.32.6install: CWD: /home/pi/node_modules/sharp
npm info lifecycle sharp@0.32.6install: Failed to exec install script
npm verb unlock done using /home/pi/.npm/_locks/staging-8a58fe8d264b10c5.lock for /home/pi/node_modules/.staging
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: linux
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: arm
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/package.json'
npm verb enoent This is related to npm not being able to find a file.
npm verb enoent
npm WARN ws@8.14.2 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN ws@8.14.2 requires a peer of utf-8-validate@>=5.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN pi No description
npm WARN pi No repository field.
npm WARN pi No README data
npm WARN pi No license field.
npm verb stack Error: sharp@0.32.6 install: (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
npm verb stack Exit status 1
npm verb stack at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
npm verb stack at EventEmitter.emit (events.js:127:13)
npm verb stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
npm verb stack at ChildProcess.emit (events.js:127:13)
npm verb stack at maybeClose (internal/child_process.js:936:16)
npm verb stack at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
npm verb pkgid sharp@0.32.6
npm verb cwd /home/pi
npm verb Linux 5.4.51+
npm verb argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--verbose" "sharp"
npm verb node v9.7.1
npm verb npm v5.6.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sharp@0.32.6 install: (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sharp@0.32.6 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm verb exit [ 1, true ]
The text was updated successfully, but these errors were encountered:
Thank you! Sorry I totally missed that. Since I was unable to install a sufficient official version on my Raspberry Pi Zero, I got it working with an unofficial build (v14.17.0). I needed to manually upgrade node-gyp independently of npm though after getting an error during the sharp installation but it worked out!
Tried several things suggested in the documentation and stackoverflow with various flags and deleting things but have had no luck so far...
Operating System: Raspbian GNU/Linux 10 (buster)
Kernel: Linux 5.4.51+
Architecture: arm
npm install --verbose sharp
npm info it worked if it ends with ok
npm verb cli [ '/usr/local/bin/node',
npm verb cli '/usr/local/bin/npm',
npm verb cli 'install',
npm verb cli '--verbose',
npm verb cli 'sharp' ]
npm info using npm@5.6.0
npm info using node@v9.7.1
npm verb config Skipping project config: /home/pi/.npmrc. (matches userconfig)
npm verb npm-session 621cf2e50df766e0
npm http fetch GET 200 https://registry.npmjs.org/sharp 356ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/color 141ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/color-convert 92ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/color-name 1178ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/fsevents 393ms (from cache)
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm verb correctMkdir /home/pi/.npm/_locks correctMkdir not in flight; initializing
npm verb lock using /home/pi/.npm/_locks/staging-8a58fe8d264b10c5.lock for /home/pi/node_modules/.staging
npm info lifecycle color-name@1.1.4
preinstall: color-name@1.1.4preinstall: color-convert@2.0.1npm info lifecycle color-convert@2.0.1
npm info lifecycle color@4.2.3
preinstall: color@4.2.3preinstall: sharp@0.32.6npm info lifecycle sharp@0.32.6
npm info linkStuff color-name@1.1.4
npm verb linkBins color-name@1.1.4
npm verb linkMans color-name@1.1.4
npm info linkStuff color-convert@2.0.1
npm verb linkBins color-convert@2.0.1
npm verb linkMans color-convert@2.0.1
npm info linkStuff color@4.2.3
npm verb linkBins color@4.2.3
npm verb linkMans color@4.2.3
npm info linkStuff sharp@0.32.6
npm verb linkBins sharp@0.32.6
npm verb linkMans sharp@0.32.6
npm info lifecycle color-name@1.1.4
install: color-name@1.1.4install: color-convert@2.0.1npm info lifecycle color-convert@2.0.1
npm info lifecycle color@4.2.3
install: color@4.2.3install: sharp@0.32.6npm info lifecycle sharp@0.32.6
/home/pi/node_modules/tar-fs/node_modules/tar-stream/constants.js:12
} catch {
^
SyntaxError: Unexpected token {
at new Script (vm.js:51:7)
at createScript (vm.js:136:10)
at Object.runInThisContext (vm.js:197:10)
at Module._compile (module.js:626:28)
at Object.Module._extensions..js (module.js:673:10)
at Module.load (module.js:575:32)
at tryModuleLoad (module.js:515:12)
at Function.Module._load (module.js:507:3)
at Module.require (module.js:606:17)
at require (internal/module.js:11:18)
npm verb lifecycle sharp@0.32.6
install: unsafe-perm in lifecycle trueinstall: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/pi/node_modules/sharp/node_modules/.bin:/home/pi/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/gamesnpm verb lifecycle sharp@0.32.6
npm verb lifecycle sharp@0.32.6
install: CWD: /home/pi/node_modules/sharpinstall: Failed to exec install scriptnpm info lifecycle sharp@0.32.6
npm verb unlock done using /home/pi/.npm/_locks/staging-8a58fe8d264b10c5.lock for /home/pi/node_modules/.staging
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: linux
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: arm
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/package.json'
npm verb enoent This is related to npm not being able to find a file.
npm verb enoent
npm WARN ws@8.14.2 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN ws@8.14.2 requires a peer of utf-8-validate@>=5.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN pi No description
npm WARN pi No repository field.
npm WARN pi No README data
npm WARN pi No license field.
npm verb stack Error: sharp@0.32.6 install:
(node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
npm verb stack Exit status 1
npm verb stack at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
npm verb stack at EventEmitter.emit (events.js:127:13)
npm verb stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
npm verb stack at ChildProcess.emit (events.js:127:13)
npm verb stack at maybeClose (internal/child_process.js:936:16)
npm verb stack at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
npm verb pkgid sharp@0.32.6
npm verb cwd /home/pi
npm verb Linux 5.4.51+
npm verb argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--verbose" "sharp"
npm verb node v9.7.1
npm verb npm v5.6.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sharp@0.32.6 install:
(node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sharp@0.32.6 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm verb exit [ 1, true ]
The text was updated successfully, but these errors were encountered: