简体   繁体   English

不同硬盘中的Git bash扩展无法识别npm

[英]Git bash extensions in different hard disk won't recognize npm

I've been trying to run node.js from the Git Bash, however my workspace is located in the second hard drive, every time I run node from C: it works ok but once I try to run it from D: says 我一直在尝试从Git Bash运行node.js,但是,每次我从C运行节点时,我的工作区都位于第二个硬盘中:工作正常,但是一旦我尝试从D运行它:

Program Files\nodejs/node: No such file or directory

I tried with this line but didn't work 我尝试了这条线,但是没有用

$ export PATH=$PATH:"C:Program Files\nodejs"

Any idea how to make this work? 任何想法如何使这项工作?

If anyone is interested I fixed it by using this line 如果有人感兴趣,我可以使用此行修复

$ export PATH=$PATH:/c/Program\ Files/nodejs 

without "", anybody know why? 没有“”,有人知道为什么吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么在 npm 安装 gh-pages 后 git bash 不能将 gh-pages 识别为有效命令? [GatsbyJS, GitHub 页] - Why won't git bash recognize gh-pages as a valid command after npm installing gh-pages? [GatsbyJS, GitHub Pages] NPM 不会通过 Git Bash 安装依赖项 - NPM won't install dependencies via Git Bash 节点和 npm 已安装,但 Git bash 无法识别“npm run dev”内的“节点”(其他外壳工作正常) - Node and npm are installed but Git bash doesn't recognize 'node' inside 'npm run dev' (other shells work fine) Git bash 不执行 npm install - Git bash doesn't execute npm install NPM安装将不会使用我提供的git url - NPM Install won't use my provided git url 为什么 npm 安装在 git bash 上不起作用 - How come npm install doesn't work on git bash 节点.js。 从硬盘安装 npm 包 - node js. install npm packages from hard disk 我无法在名为 phaser3-project-template 的 git bash 文件夹中安装 npm 或 node js - I can't install npm or node js in my git bash folder named phaser3-project-template 一台计算机上无法在git bash中运行“ npm start”,但在另一台计算机上我可以 - Can't run “npm start” in git bash on one computer, but on another I can `jupyterlab` 无法识别 `nodejs` 和 `npm` 安装 - `jupyterlab` doesn't recognize `nodejs` and `npm` installations
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM