Local Community

Error, unable to provision, when installing headless in mac OSX Big Sur

Im getting this error when trying to provision a site on local using Mac OSX Big Sur. I’m unable to create the headless environment.

Error: Command failed: /Applications/Local.app/Contents/MacOS/Local /Users/msuarez/Library/Application Support/Local/addons/@getflywheel-local-addon-headless/node_modules/npx/index.js create-next-app --example https://github.com/wpengine/headless-framework/tree/canary --example-path examples/getting-started --use-npm app-node
Error: EACCES: permission denied, mkdir '/Users/msuarez/.npm/_npx/4708'
TypeError: Cannot read property 'get' of undefined
at errorHandler (/Users/msuarez/Library/Application Support/Local/addons/@getflywheel-local-addon-headless/node_modules/npx/node_modules/npm/lib/utils/error-handler.js:213:18)
at /Users/msuarez/Library/Application Support/Local/addons/@getflywheel-local-addon-headless/node_modules/npx/node_modules/npm/bin/npm-cli.js:83:20
at cb (/Users/msuarez/Library/Application Support/Local/addons/@getflywheel-local-addon-headless/node_modules/npx/node_modules/npm/lib/npm.js:215:22)
at /Users/msuarez/Library/Application Support/Local/addons/@getflywheel-local-addon-headless/node_modules/npx/node_modules/npm/lib/npm.js:253:24
at /Users/msuarez/Library/Application Support/Local/addons/@getflywheel-local-addon-headless/node_modules/npx/node_modules/npm/lib/config/core.js:81:7
at Array.forEach (<anonymous>)
at /Users/msuarez/Library/Application Support/Local/addons/@getflywheel-local-addon-headless/node_modules/npx/node_modules/npm/lib/config/core.js:80:13
at f (/Users/msuarez/Library/Application Support/Local/addons/@getflywheel-local-addon-headless/node_modules/npx/node_modules/npm/node_modules/once/once.js:25:25)
at afterExtras (/Users/msuarez/Library/Application Support/Local/addons/@getflywheel-local-addon-headless/node_modules/npx/node_modules/npm/lib/config/core.js:178:20)
at /Users/msuarez/Library/Application Support/Local/addons/@getflywheel-local-addon-headless/node_modules/npx/node_modules/npm/node_modules/mkdirp/index.js:47:53
/Users/msuarez/Library/Application Support/Local/addons/@getflywheel-local-addon-headless/node_modules/npx/node_modules/npm/lib/utils/error-handler.js:213
if (npm.config.get('json')) {
^

TypeError: Cannot read property 'get' of undefined
at process.errorHandler (/Users/msuarez/Library/Application Support/Local/addons/@getflywheel-local-addon-headless/node_modules/npx/node_modules/npm/lib/utils/error-handler.js:213:18)
at process.emit (events.js:223:5)
at process._fatalException (internal/process/execution.js:150:25)
Install for [ 'create-next-app@latest' ] failed with code 7

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                  npx update check failed                   β”‚
β”‚            Try running with sudo or get access             β”‚
β”‚            to the local update config store via            β”‚
β”‚ sudo chown -R $USER:$(id -gn $USER) /Users/msuarez/.config β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜




Error: Command failed: /Applications/Local.app/Contents/MacOS/Local /Users/msuarez/Library/Application Support/Local/addons/@getflywheel-local-addon-headless/node_modules/npx/index.js create-next-app --example https://github.com/wpengine/headless-framework/tree/canary --example-path examples/getting-started --use-npm app-node
Error: EACCES: permission denied, mkdir '/Users/msuarez/.npm/_npx/4708'
TypeError: Cannot read property 'get' of undefined
at errorHandler (/Users/msuarez/Library/Application Support/Local/addons/@getflywheel-local-addon-headless/node_modules/npx/node_modules/npm/lib/utils/error-handler.js:213:18)
at /Users/msuarez/Library/Application Support/Local/addons/@getflywheel-local-addon-headless/node_modules/npx/node_modules/npm/bin/npm-cli.js:83:20
at cb (/Users/msuarez/Library/Application Support/Local/addons/@getflywheel-local-addon-headless/node_modules/npx/node_modules/npm/lib/npm.js:215:22)
at /Users/msuarez/Library/Application Support/Local/addons/@getflywheel-local-addon-headless/node_modules/npx/node_modules/npm/lib/npm.js:253:24
at /Users/msuarez/Library/Application Support/Local/addons/@getflywheel-local-addon-headless/node_modules/npx/node_modules/npm/lib/config/core.js:81:7
at Array.forEach (<anonymous>)
at /Users/msuarez/Library/Application Support/Local/addons/@getflywheel-local-addon-headless/node_modules/npx/node_modules/npm/lib/config/core.js:80:13
at f (/Users/msuarez/Library/Application Support/Local/addons/@getflywheel-local-addon-headless/node_modules/npx/node_modules/npm/node_modules/once/once.js:25:25)
at afterExtras (/Users/msuarez/Library/Application Support/Local/addons/@getflywheel-local-addon-headless/node_modules/npx/node_modules/npm/lib/config/core.js:178:20)
at /Users/msuarez/Library/Application Support/Local/addons/@getflywheel-local-addon-headless/node_modules/npx/node_modules/npm/node_modules/mkdirp/index.js:47:53
/Users/msuarez/Library/Application Support/Local/addons/@getflywheel-local-addon-headless/node_modules/npx/node_modules/npm/lib/utils/error-handler.js:213
if (npm.config.get('json')) {
^

TypeError: Cannot read property 'get' of undefined
at process.errorHandler (/Users/msuarez/Library/Application Support/Local/addons/@getflywheel-local-addon-headless/node_modules/npx/node_modules/npm/lib/utils/error-handler.js:213:18)
at process.emit (events.js:223:5)
at process._fatalException (internal/process/execution.js:150:25)
Install for [ 'create-next-app@latest' ] failed with code 7

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                  npx update check failed                   β”‚
β”‚            Try running with sudo or get access             β”‚
β”‚            to the local update config store via            β”‚
β”‚ sudo chown -R $USER:$(id -gn $USER) /Users/msuarez/.config β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Thanks for that log and for taking the Atlas Add-on for a spin!

You mention that this is under BigSur – is this also a new M1 mac?

Also, that error mentions you user’s .npm folder, but I think Local shouldn’t be trying to write to that folder.

Do you have Node already installed on this computer? How did you install it? Homebrew, or NVM? Something else?

Also, do you know what shell you are using on this computer?

Nope, not an M1, I have a 2018 intel mbp.
I do have node already installed. Installed by downloading the installer.
I have node and npm which i am using in terminal.
For shell, i use the mac terminal.

Thanks!

Any solutions for this problem?

I don’t think we have any solution to this right now, but from the looks of this error, it feels like a path pollution issue.

By that I mean that the node version that was installed is taking precedent over the one that comes bundled with Local.

We’re taking a closer look at how we can guard against this, but I think that you might be able to work around this in one of two ways:

  1. Uninstall the system node. I know that’s probably not realistic, but just throwing it out there.
  2. Examine how the system node is installed in the shell, and temporarily disable it.

That second item may be unclear, so let me expand on it. For me, I’ve installed node using nvm and I interact with nvm in my ZSH shell through .oh-my-zsh

# in .zshrc
export ZSH=$HOME/.oh-my-zsh
plugins=(
    vi-mode
    nvm
)
source $ZSH/oh-my-zsh.sh

For me I would try removing that nvm bit from my shell configuration and see if that allowed me to spin up a site using the Atlas addon.

Your setup is probably different than mine, but you might check either your .zshrc file or the .bashrc file to see if commenting out any node configuration allows you to create a new site using the Atlas add-on.

I’d be curious to know what you find out when taking a closer look since it can help us have more examples of developer environments in the wild!

Take a look at this issue and see if any of it applies.

1 Like

Same for me in Mojave with Local v6.1.0+5452

Hey @skunkworks – Welcome to the Local Community Forums!

Can you please provide your Local Log? See this Community Forum post for instructions on how to do so: