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

nvm is not compatible with the "PREFIX" environment variable: currently set to "/usr/local" #43

Open
iq9891 opened this issue Jun 5, 2021 · 0 comments
Labels
help wanted Extra attention is needed npm question Further information is requested

Comments

@iq9891
Copy link
Owner

iq9891 commented Jun 5, 2021

问题

error Command failed.
Exit code: 1
Command: git
Arguments: commit -m v1.0.3
Directory: /Users/lee/lee/npm/vite-plugin-html-mpa
Output:
nvm is not compatible with the "PREFIX" environment variable: currently set to "/usr/local"
Run `unset PREFIX` to unset it.
 > running pre-commit hook: lint-staged
internal/modules/cjs/loader.js:625
  throw e;
  ^

Error: No valid exports main found for '/Users/lee/lee/npm/vite-plugin-html-mpa/node_modules/colorette'
    at resolveExportsTarget (internal/modules/cjs/loader.js:622:9)
    at applyExports (internal/modules/cjs/loader.js:499:14)
    at resolveExports (internal/modules/cjs/loader.js:548:12)
    at Function.Module._findPath (internal/modules/cjs/loader.js:654:22)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:953:27)
    at Function.Module._load (internal/modules/cjs/loader.js:859:27)
    at Module.require (internal/modules/cjs/loader.js:1028:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/Users/lee/lee/npm/vite-plugin-html-mpa/node_modules/listr2/dist/utils/colorette.js:4:19)
    at Module._compile (internal/modules/cjs/loader.js:1139:30) {
  code: 'MODULE_NOT_FOUND'
}

pre-commit hook failed (add --no-verify to bypass)
info Visit https://yarnpkg.com/en/docs/cli/publish for documentation about this command.

方法

进入 .zshrc ,添加下面代码即可

export PREFIX= nvm use --delete-prefix stable
@iq9891 iq9891 added help wanted Extra attention is needed npm question Further information is requested labels Jun 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed npm question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant