phetsims / chipper

Tools for developing and building PhET interactive simulations.
http://scenerystack.org/
MIT License
11 stars 14 forks source link

[mac specific] No Xcode or CLT version detected #992

Closed samreid closed 3 years ago

samreid commented 4 years ago

Related to https://github.com/phetsims/chipper/issues/990 After updating to Node 14, then cleaning node_modules and running npm install, I see these errors:

~/apache-document-root/main/energy-skate-park$ cd ../chipper/
~/apache-document-root/main/chipper$ rm -rf node_modules/
~/apache-document-root/main/chipper$ npm install

> fsevents@1.2.13 install /Users/samreid/apache-document-root/main/chipper/node_modules/watchpack-chokidar2/node_modules/fsevents
> node install.js

No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.

gyp: No Xcode or CLT version detected!
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/Users/samreid/.npm-global/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Darwin 19.6.0
gyp ERR! command "/usr/local/bin/node" "/Users/samreid/.npm-global/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/samreid/apache-document-root/main/chipper/node_modules/watchpack-chokidar2/node_modules/fsevents
gyp ERR! node -v v14.15.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 

> fsevents@1.2.13 install /Users/samreid/apache-document-root/main/chipper/node_modules/webpack-dev-server/node_modules/fsevents
> node install.js

No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.

gyp: No Xcode or CLT version detected!
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/Users/samreid/.npm-global/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Darwin 19.6.0
gyp ERR! command "/usr/local/bin/node" "/Users/samreid/.npm-global/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/samreid/apache-document-root/main/chipper/node_modules/webpack-dev-server/node_modules/fsevents
gyp ERR! node -v v14.15.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 

> puppeteer@2.1.1 install /Users/samreid/apache-document-root/main/chipper/node_modules/puppeteer
> node install.js

Downloading Chromium r722234 - 116.4 Mb [====================] 100% 0.0s 
Chromium downloaded to /Users/samreid/apache-document-root/main/chipper/node_modules/puppeteer/.local-chromium/mac-722234
added 1053 packages from 1388 contributors and audited 1055 packages in 23.514s

44 packages are looking for funding
  run `npm fund` for details

found 4 vulnerabilities (1 low, 1 moderate, 2 high)
  run `npm audit fix` to fix them, or `npm audit` for details
~/apache-document-root/main/chipper$ cd ../energy-skate-park
~/apache-document-root/main/energy-skate-park$ grunt
(node:215) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
Running "lint-all" task

Running "report-media" task

Running "clean" task

Running "build" task
Building runnable repository (energy-skate-park, brands: phet, phet-io)
Building brand: phet
>> Webpack build complete: 2778ms
>> Unused images module: energy-skate-park/images/skater-icon_png.js
>> Production minification complete: 19184ms (2172328 bytes)
>> Debug minification complete: 0ms (6656430 bytes)
Building brand: phet-io
>> Webpack build complete: 2079ms
>> Unused images module: energy-skate-park/images/skater-icon_png.js
>> Production minification complete: 15328ms (2186122 bytes)
>> Debug minification complete: 16000ms (2453198 bytes)
>> No client guides found at ../phet-io-client-guides/energy-skate-park/, no guides being built.

Done.

Assigning to @ariel-phet to prioritize and delegate.

mattpen commented 4 years ago

@ariel-phet asked me to investigate. Here were the results on my machine (MacOS 10.14.6):

PhETs-MacBook-Pro:website-meteor volta$ node -v
v14.15.0
PhETs-MacBook-Pro:website-meteor volta$ cd ../chipper
PhETs-MacBook-Pro:chipper volta$ rm -rf node_modules/
PhETs-MacBook-Pro:chipper volta$ npm install
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.

> fsevents@1.2.13 install /Users/volta/phet/git/chipper/node_modules/watchpack-chokidar2/node_modules/fsevents
> node install.js

  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
  SOLINK_MODULE(target) Release/fse.node

> fsevents@1.2.13 install /Users/volta/phet/git/chipper/node_modules/webpack-dev-server/node_modules/fsevents
> node install.js

  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
  SOLINK_MODULE(target) Release/fse.node

> puppeteer@2.1.1 install /Users/volta/phet/git/chipper/node_modules/puppeteer
> node install.js

Downloading Chromium r722234 - 116.4 Mb [====================] 100% 0.0s 
Chromium downloaded to /Users/volta/phet/git/chipper/node_modules/puppeteer/.local-chromium/mac-722234
npm WARN notsup Unsupported engine for pngjs@0.4.0: wanted: {"node":"0.8.x"} (current: {"node":"14.15.0","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: pngjs@0.4.0
npm WARN notsup Unsupported engine for watchpack-chokidar2@2.0.0: wanted: {"node":"<8.10.0"} (current: {"node":"14.15.0","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: watchpack-chokidar2@2.0.0

added 1061 packages from 1389 contributors and audited 1063 packages in 48.598s

52 packages are looking for funding
  run `npm fund` for details

found 3 vulnerabilities (1 low, 1 moderate, 1 high)
  run `npm audit fix` to fix them, or `npm audit` for details

I did not see the errors that @samreid described, but this line is concerning:

npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.

It looks like webpack-dev-server has a dependency on fsevents 1. Our current version is 3.10.1, but the current version listed at https://webpack.js.org/configuration/dev-server/ is 5.3.2. I don't know what this library is used for, so I can't make a recommendation of how to proceed.

jonathanolson commented 4 years ago

@samreid have you reinstalled xcode dev tools?

samreid commented 4 years ago

Not recently, self assigning to try that in the future.

samreid commented 4 years ago

When I ran a command to install the xcode dev tools, it said I already had them:

~/apache-document-root/main/chipper$ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates

Running npm list doesn't mention node-gyp anywhere.

samreid commented 4 years ago

I'm not sure what to investigate next, or how to know if this is even a problem. Tagging for developer meeting to touch base and decide next steps.

samreid commented 4 years ago

JO: I don't see this problem on Node 14 on Mac.

AP: Let's close this issue, since we don't see any symptoms of it.

CM: I haven't seen anything like this.

MK: There is a newer version of webpack dev server. I tried it, but it still had the deprecation warning.

Since this seems related to webpack-dev-server, it seems not too important. Or when we are doing that more, we can re-investigate if it causes problems.

jessegreenberg commented 4 years ago

Just pasting the output from my windows 10 machine, node version 14.15.0. No errors, but there are warnings related to "fsevents" and "chokidar".

Jesse@DESKTOP-F2K2K7E MINGW64 ~/Documents/Development/phetsims/chipper (master)
$ npm install
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
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 WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
> puppeteer@5.5.0 install C:\Users\Jesse\Documents\Development\phetsims\chipper\node_modules\puppeteer
> node install.js
Chromium (818858) downloaded to C:\Users\Jesse\Documents\Development\phetsims\chipper\node_modules\puppeteer\.local-chromium\win64-818858
npm WARN notsup Unsupported engine for pngjs@0.4.0: wanted: {"node":"0.8.x"} (current: {"node":"14.15.0","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: pngjs@0.4.0
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\watchpack-chokidar2\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":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\webpack-dev-server\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":"win32","arch":"x64"})
added 1061 packages from 613 contributors and audited 1066 packages in 54.494s
55 packages are looking for funding
  run `npm fund` for details
found 3 vulnerabilities (1 low, 1 moderate, 1 high)
samreid commented 3 years ago

On second thought, I'd like to understand what dependency is causing this, and to see if updating a dependency resolves it.

samreid commented 3 years ago

I updated everything in package.json to latest, and still saw this problem on npm install. Closing again.