Recently I updated to Cordova Tools version 6 for Visual Studio I am now getting this error. Anytime I try to build my solution.
: BLD00401 : Could not find
This appears to be a bug that we introduced in Update 6 that causes npm install errors if the path to your npm install directory (usually in your AppData folder) has a space in the path. The simple workaround is to change your npm install directory:
npm config set prefix "C:\Folder\With\No\Spaces"
And then build again in VS. We will get this fixed up and released in Update 7 as soon as we can.
Sorry for the inconvenience.
Update: a possible workaround below Many thanks to the MS team > see answer for fix until Update 7
Not an answer - more like an "inventory" of attempts at getting to one.
In any Cordova Project - existing, new (blank template, ionic template), etc.
BLD401 Error :
BLD00401 : Could not find module 'C:\Users\Ed Chavez\AppData\Roaming\npm\node_modules\vs-tac\app.js'.
Please Go to Tools --> Options --> Tools for Apache Cordova --> Cordova Tools --> Clear Cordova Cache and try building again.
vs-tac
(from original Program Files
) to the folder in the error, does not resolve the issue. Each time you build your project, that copied folder is cleared/removedspace
in pathInspecting Output window
points to what could be the issue (detail below):
vs-tac
is being installed:'C:\Users\Ed' is not recognized as an internal or external command, (TaskId:10)
which is the (my) Users
folder and it contains a space
between my first and last name.
Your environment has been set up for using Node.js 4.3.0 (x64) and npm. (TaskId:10)
------ Ensuring correct global installation of package from source package directory: C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\COMMON7\IDE\EXTENSIONS\APACHECORDOVATOOLS\packages\vs-tac (TaskId:10)
------ Name from source package.json: vs-tac (TaskId:10)
------ Version from source package.json: 1.0.34 (TaskId:10)
------ Package not currently installed globally. (TaskId:10)
------ Installing globally from source package. This could take a few minutes... (TaskId:10)
Each package is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Some packages may include dependencies which are governed by additional licenses. Follow the package source (feed) URL to determine any dependencies. (TaskId:10)
'C:\Users\Ed' is not recognized as an internal or external command, (TaskId:10)
operable program or batch file. (TaskId:10)
------ npm install failed. Exit code: 1 (TaskId:10)
------ Package installation failed. Retrying... (TaskId:10)
So now in search of some fix (likely must come from Microsoft)...will update as necessary
After more tinkering, the issue is the space
in your Windows User name. So if your users folder looks something like this c\users\firstName lastName\
you will be affected by this bug.
Here's the portion where vs-tac
is successfully installed, now with a username with no spaces (edsf)
Your environment has been set up for using Node.js 4.3.0 (x64) and npm.
---skipped for brevity ---
edge-cs@0.3.0 install C:\Users\edsf\AppData\Roaming\npm\node_modules\vs-tac\node_modules\edge\node_modules\edge-cs
...
Success: platform check for edge.js: node.js x64 v4.3.0
C:\Users\edsf\AppData\Roaming\npm\vs-tac-cli -> C:\Users\edsf\AppData\Roaming\npm\node_modules\vs-tac\vs-tac-cli.cmd
I'd the same issue here. In my computer I'd to copy app.js from another folder:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ApacheCordovaTools\Packages\vs-tac
I know this is not a good solution, but worked for me.
But in another computer here, I reinstalled with this command and worked (I closed VS prior to run this command, and started a new project):
npm install -g "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ApacheCordovaTools\packages\vs-tac"
Hope these notes can help you out.