Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 BUG: Possible new dependancies not documented #3708

Closed
mrbm opened this issue Aug 6, 2023 · 4 comments
Closed

🐛 BUG: Possible new dependancies not documented #3708

mrbm opened this issue Aug 6, 2023 · 4 comments
Labels
bug Something that isn't working

Comments

@mrbm
Copy link

mrbm commented Aug 6, 2023

Which Cloudflare product(s) does this pertain to?

Wrangler core

What version(s) of the tool(s) are you using?

2.4

What version of Node are you using?

tested v18 and v20

What operating system are you using?

OSX Mac M1 - 13.5 (22G74)

Describe the Bug

In previous iteration updates of V2 I had no problem updating wrangler running the standard command:
npm install -g wrangler
or
install -g wrangler

However since wrangler went to v3 I have been unable to update. I have not added any new packages or libraries. I have tried node 18, node 20, but still a failure. I do not have Xtools installed on this computer and have no issues with v2 installations.

Please provide a link to a minimal reproduction

No response

Please provide any relevant error logs

mrjonze@Midnight-Blue-Air food-portal % sudo npm install -g wrangler
Password:
npm WARN deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.
npm WARN deprecated [email protected]: Please use @jridgewell/sourcemap-codec instead
npm ERR! code 1
npm ERR! path /Users/mrjonze/.nvm/versions/node/v18.17.0/lib/node_modules/wrangler/node_modules/better-sqlite3
npm ERR! command failed
npm ERR! command sh -c prebuild-install || node-gyp rebuild --release
npm ERR! prebuild-install warn install No prebuilt binaries found (target=18.17.0 runtime=node arch=arm64 libc= platform=darwin)
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | arm64
npm ERR! gyp info find Python using Python version 3.8.2 found at "/Library/Developer/CommandLineTools/usr/bin/python3"
npm ERR! gyp http GET https://nodejs.org/download/release/v18.17.0/node-v18.17.0-headers.tar.gz
npm ERR! gyp http 200 https://nodejs.org/download/release/v18.17.0/node-v18.17.0-headers.tar.gz
npm ERR! gyp http GET https://nodejs.org/download/release/v18.17.0/SHASUMS256.txt
npm ERR! gyp http 200 https://nodejs.org/download/release/v18.17.0/SHASUMS256.txt
npm ERR! gyp info spawn /Library/Developer/CommandLineTools/usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/Users/mrjonze/.nvm/versions/node/v18.17.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/mrjonze/.nvm/versions/node/v18.17.0/lib/node_modules/wrangler/node_modules/better-sqlite3/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/mrjonze/.nvm/versions/node/v18.17.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/mrjonze/Library/Caches/node-gyp/18.17.0/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/Users/mrjonze/Library/Caches/node-gyp/18.17.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/Users/mrjonze/.nvm/versions/node/v18.17.0/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/mrjonze/Library/Caches/node-gyp/18.17.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/mrjonze/.nvm/versions/node/v18.17.0/lib/node_modules/wrangler/node_modules/better-sqlite3',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
npm ERR! No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
npm ERR! No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.
npm ERR!
npm ERR!
npm ERR!
npm ERR! Traceback (most recent call last):
npm ERR! File "/Users/mrjonze/.nvm/versions/node/v18.17.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1502, in XcodeVersion
npm ERR! version_list = GetStdoutQuiet(["xcodebuild", "-version"]).splitlines()
npm ERR! File "/Users/mrjonze/.nvm/versions/node/v18.17.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1563, in GetStdoutQuiet
npm ERR! raise GypError("Error %d running %s" % (job.returncode, cmdlist[0]))
npm ERR! gyp.common.GypError: Error 1 running xcodebuild
npm ERR!
npm ERR! During handling of the above exception, another exception occurred:
npm ERR!
npm ERR! Traceback (most recent call last):
npm ERR! File "/Users/mrjonze/.nvm/versions/node/v18.17.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 45, in
npm ERR! sys.exit(gyp.script_main())
npm ERR! File "/Users/mrjonze/.nvm/versions/node/v18.17.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 686, in script_main
npm ERR! return main(sys.argv[1:])
npm ERR! File "/Users/mrjonze/.nvm/versions/node/v18.17.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 678, in main
npm ERR! return gyp_main(args)
npm ERR! File "/Users/mrjonze/.nvm/versions/node/v18.17.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 663, in gyp_main
npm ERR! generator.GenerateOutput(flat_list, targets, data, params)
npm ERR! File "/Users/mrjonze/.nvm/versions/node/v18.17.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 2654, in GenerateOutput
npm ERR! writer.Write(
npm ERR! File "/Users/mrjonze/.nvm/versions/node/v18.17.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 883, in Write
npm ERR! self.WriteActions(
npm ERR! File "/Users/mrjonze/.nvm/versions/node/v18.17.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 1017, in WriteActions
npm ERR! env = self.GetSortedXcodeEnv()
npm ERR! File "/Users/mrjonze/.nvm/versions/node/v18.17.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 2272, in GetSortedXcodeEnv
npm ERR! return gyp.xcode_emulation.GetSortedXcodeEnv(
npm ERR! File "/Users/mrjonze/.nvm/versions/node/v18.17.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1888, in GetSortedXcodeEnv
npm ERR! env = _GetXcodeEnv(
npm ERR! File "/Users/mrjonze/.nvm/versions/node/v18.17.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1743, in _GetXcodeEnv
npm ERR! "XCODE_VERSION_ACTUAL": XcodeVersion()[0],
npm ERR! File "/Users/mrjonze/.nvm/versions/node/v18.17.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1513, in XcodeVersion
npm ERR! version = CLTVersion() # macOS Catalina returns 11.0.0.0.1.1567737322
npm ERR! File "/Users/mrjonze/.nvm/versions/node/v18.17.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1551, in CLTVersion
npm ERR! return re.search(regex, output).groupdict()["version"]
npm ERR! AttributeError: 'NoneType' object has no attribute 'groupdict'
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: gyp failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onCpExit (/Users/mrjonze/.nvm/versions/node/v18.17.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:325:16)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:514:28)
npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Darwin 22.6.0
npm ERR! gyp ERR! command "/Users/mrjonze/.nvm/versions/node/v18.17.0/bin/node" "/Users/mrjonze/.nvm/versions/node/v18.17.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
npm ERR! gyp ERR! cwd /Users/mrjonze/.nvm/versions/node/v18.17.0/lib/node_modules/wrangler/node_modules/better-sqlite3
npm ERR! gyp ERR! node -v v18.17.0
npm ERR! gyp ERR! node-gyp -v v9.3.1
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: /Users/mrjonze/.npm/_logs/2023-08-06T06_50_22_740Z-debug-0.log

@mrbm mrbm added the bug Something that isn't working label Aug 6, 2023
@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk Aug 6, 2023
@toinbis
Copy link

toinbis commented Aug 6, 2023

Same here, +1.

My error:

[5/5] 🔨  Building fresh packages...
[-/3] ⢀ waiting...
[2/3] ⢀ better-sqlite3
error <projectpath>/node_modules/better-sqlite3: Command failed.
Exit code: 127
Command: prebuild-install || node-gyp rebuild --release
Arguments: 
Directory: <projectpath>/node_modules/better-sqlite3
Output:
prebuild-install warn install No prebuilt binaries found (target=20.4.0 runtime=node arch=arm64 libc= platform=darwin)

@jonnie-clouds
Copy link

seeing this, too:

~/dev took 2s 
❯ node -v                         
v18.13.0

~/dev 
❯ npx wrangler                    
Need to install the following packages:
  [email protected]
Ok to proceed? (y) y
npm WARN deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.
npm WARN deprecated [email protected]: Please use @jridgewell/sourcemap-codec instead

@JacksonKearl
Copy link
Contributor

@mrbm

I do not have Xtools installed on this computer and have no issues with v2 installations.

Can you try installing them? V3 moved to using a sqlite implementation of things like KV, this comes with it some native executables that need to be built using xcode build tools.

Try xcode-select --install and see what happens.

@mrbm
Copy link
Author

mrbm commented Aug 7, 2023

I went into batman mode and have made this new bug report that summarizes problem in documentation because of the new dependency along with the specific scenario that requires the x-code to be reinstalled in order to proceed: cloudflare/cloudflare-docs#10230 Cloudflare has now re-opened my bug report to address the issue.

@mrbm mrbm closed this as completed Aug 7, 2023
@github-project-automation github-project-automation bot moved this from Untriaged to Done in workers-sdk Aug 7, 2023
mrbbot added a commit to cloudflare/miniflare that referenced this issue Aug 14, 2023
...and move dependencies only used in Workers to `devDependencies`.
They're bundled in with the Worker code, so don't need to be
installed again. Importantly, this change removes `better-sqlite3`,
meaning Miniflare no longer has any native dependencies other than
`workerd`.

Fixes #599

Fixes cloudflare/workers-sdk#3423
Fixes cloudflare/workers-sdk#3449
Fixes cloudflare/workers-sdk#3531
Fixes cloudflare/workers-sdk#3534
Fixes cloudflare/workers-sdk#3708
Fixes cloudflare/workers-sdk#3746

Closes cloudflare/cloudflare-docs#10241
mrbbot added a commit to cloudflare/miniflare that referenced this issue Aug 17, 2023
...and move dependencies only used in Workers to `devDependencies`.
They're bundled in with the Worker code, so don't need to be
installed again. Importantly, this change removes `better-sqlite3`,
meaning Miniflare no longer has any native dependencies other than
`workerd`.

Fixes #599

Fixes cloudflare/workers-sdk#3423
Fixes cloudflare/workers-sdk#3449
Fixes cloudflare/workers-sdk#3531
Fixes cloudflare/workers-sdk#3534
Fixes cloudflare/workers-sdk#3708
Fixes cloudflare/workers-sdk#3746

Closes cloudflare/cloudflare-docs#10241
mrbbot added a commit to cloudflare/miniflare that referenced this issue Aug 17, 2023
...and move dependencies only used in Workers to `devDependencies`.
They're bundled in with the Worker code, so don't need to be
installed again. Importantly, this change removes `better-sqlite3`,
meaning Miniflare no longer has any native dependencies other than
`workerd`.

Fixes #599

Fixes cloudflare/workers-sdk#3423
Fixes cloudflare/workers-sdk#3449
Fixes cloudflare/workers-sdk#3531
Fixes cloudflare/workers-sdk#3534
Fixes cloudflare/workers-sdk#3708
Fixes cloudflare/workers-sdk#3746

Closes cloudflare/cloudflare-docs#10241
mrbbot added a commit to cloudflare/miniflare that referenced this issue Aug 17, 2023
...and move dependencies only used in Workers to `devDependencies`.
They're bundled in with the Worker code, so don't need to be
installed again. Importantly, this change removes `better-sqlite3`,
meaning Miniflare no longer has any native dependencies other than
`workerd`.

Fixes #599

Fixes cloudflare/workers-sdk#3423
Fixes cloudflare/workers-sdk#3449
Fixes cloudflare/workers-sdk#3531
Fixes cloudflare/workers-sdk#3534
Fixes cloudflare/workers-sdk#3708
Fixes cloudflare/workers-sdk#3746

Closes cloudflare/cloudflare-docs#10241
mrbbot added a commit to cloudflare/miniflare that referenced this issue Aug 17, 2023
...and move dependencies only used in Workers to `devDependencies`.
They're bundled in with the Worker code, so don't need to be
installed again. Importantly, this change removes `better-sqlite3`,
meaning Miniflare no longer has any native dependencies other than
`workerd`.

Fixes #599

Fixes cloudflare/workers-sdk#3423
Fixes cloudflare/workers-sdk#3449
Fixes cloudflare/workers-sdk#3531
Fixes cloudflare/workers-sdk#3534
Fixes cloudflare/workers-sdk#3708
Fixes cloudflare/workers-sdk#3746

Closes cloudflare/cloudflare-docs#10241
mrbbot added a commit to cloudflare/miniflare that referenced this issue Aug 17, 2023
...and move dependencies only used in Workers to `devDependencies`.
They're bundled in with the Worker code, so don't need to be
installed again. Importantly, this change removes `better-sqlite3`,
meaning Miniflare no longer has any native dependencies other than
`workerd`.

Fixes #599

Fixes cloudflare/workers-sdk#3423
Fixes cloudflare/workers-sdk#3449
Fixes cloudflare/workers-sdk#3531
Fixes cloudflare/workers-sdk#3534
Fixes cloudflare/workers-sdk#3708
Fixes cloudflare/workers-sdk#3746

Closes cloudflare/cloudflare-docs#10241
mrbbot added a commit to cloudflare/miniflare that referenced this issue Aug 17, 2023
...and move dependencies only used in Workers to `devDependencies`.
They're bundled in with the Worker code, so don't need to be
installed again. Importantly, this change removes `better-sqlite3`,
meaning Miniflare no longer has any native dependencies other than
`workerd`.

Fixes #599

Fixes cloudflare/workers-sdk#3423
Fixes cloudflare/workers-sdk#3449
Fixes cloudflare/workers-sdk#3531
Fixes cloudflare/workers-sdk#3534
Fixes cloudflare/workers-sdk#3708
Fixes cloudflare/workers-sdk#3746

Closes cloudflare/cloudflare-docs#10241
mrbbot added a commit to cloudflare/miniflare that referenced this issue Sep 5, 2023
...and move dependencies only used in Workers to `devDependencies`.
They're bundled in with the Worker code, so don't need to be
installed again. Importantly, this change removes `better-sqlite3`,
meaning Miniflare no longer has any native dependencies other than
`workerd`.

Fixes #599

Fixes cloudflare/workers-sdk#3423
Fixes cloudflare/workers-sdk#3449
Fixes cloudflare/workers-sdk#3531
Fixes cloudflare/workers-sdk#3534
Fixes cloudflare/workers-sdk#3708
Fixes cloudflare/workers-sdk#3746

Closes cloudflare/cloudflare-docs#10241
mrbbot added a commit to cloudflare/miniflare that referenced this issue Sep 5, 2023
...and move dependencies only used in Workers to `devDependencies`.
They're bundled in with the Worker code, so don't need to be
installed again. Importantly, this change removes `better-sqlite3`,
meaning Miniflare no longer has any native dependencies other than
`workerd`.

Fixes #599

Fixes cloudflare/workers-sdk#3423
Fixes cloudflare/workers-sdk#3449
Fixes cloudflare/workers-sdk#3531
Fixes cloudflare/workers-sdk#3534
Fixes cloudflare/workers-sdk#3708
Fixes cloudflare/workers-sdk#3746

Closes cloudflare/cloudflare-docs#10241
mrbbot added a commit that referenced this issue Oct 31, 2023
...and move dependencies only used in Workers to `devDependencies`.
They're bundled in with the Worker code, so don't need to be
installed again. Importantly, this change removes `better-sqlite3`,
meaning Miniflare no longer has any native dependencies other than
`workerd`.

Fixes cloudflare/miniflare#599

Fixes #3423
Fixes #3449
Fixes #3531
Fixes #3534
Fixes #3708
Fixes #3746

Closes cloudflare/cloudflare-docs#10241
mrbbot added a commit that referenced this issue Nov 1, 2023
...and move dependencies only used in Workers to `devDependencies`.
They're bundled in with the Worker code, so don't need to be
installed again. Importantly, this change removes `better-sqlite3`,
meaning Miniflare no longer has any native dependencies other than
`workerd`.

Fixes cloudflare/miniflare#599

Fixes #3423
Fixes #3449
Fixes #3531
Fixes #3534
Fixes #3708
Fixes #3746

Closes cloudflare/cloudflare-docs#10241
mrbbot added a commit that referenced this issue Nov 1, 2023
...and move dependencies only used in Workers to `devDependencies`.
They're bundled in with the Worker code, so don't need to be
installed again. Importantly, this change removes `better-sqlite3`,
meaning Miniflare no longer has any native dependencies other than
`workerd`.

Fixes cloudflare/miniflare#599

Fixes #3423
Fixes #3449
Fixes #3531
Fixes #3534
Fixes #3708
Fixes #3746

Closes cloudflare/cloudflare-docs#10241
mrbbot added a commit that referenced this issue Nov 1, 2023
...and move dependencies only used in Workers to `devDependencies`.
They're bundled in with the Worker code, so don't need to be
installed again. Importantly, this change removes `better-sqlite3`,
meaning Miniflare no longer has any native dependencies other than
`workerd`.

Fixes cloudflare/miniflare#599

Fixes #3423
Fixes #3449
Fixes #3531
Fixes #3534
Fixes #3708
Fixes #3746

Closes cloudflare/cloudflare-docs#10241
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that isn't working
Projects
None yet
Development

No branches or pull requests

4 participants