Gulp command leading to module errors cannot find

I am trying to configure the aurelia main application for windows. I followed the following instructions: http://aurelia.io/get-started.html , which includes:

  • Installed node js
  • Installed gulp with: npm install -g gulp
  • Installed jspn with: npm install -g jspm
  • Then download the sample source code from https://github.com/aurelia/skeleton-navigation/releases to the project folder.
  • I opened the console and was changed to the project directory, i.e. navigation application
  • Run: npm install
  • Run: jspm install -y
  • Finally, I started the server using the command: gulp watch

All of the above steps completed successfully, except for step 8, which gives an error:

 E:\aurelia\navigation-app>gulp watch module.js:338 throw err; ^ Error: Cannot find module 'debug/node' at Function.Module._resolveFilename (module.js:336:15) at Function.Module._load (module.js:278:25) at Module.require (module.js:365:17) at require (module.js:384:17) at Object.<anonymous> (E:\aurelia\navigation-app\node_modules\gulp-babel\nod e_modules\babel-core\lib\babel\util.js:22:34) at Module._compile (module.js:460:26) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Module.require (module.js:365:17) at require (module.js:384:17) 

I do not understand why he can not find the modules. If I install this module manually, it will give an error message for another module when I try to run: gulp watch

+5
source share
4 answers

I also struggled with this problem, as I was updating Aurelia and its related tools to the latest versions. This could be due to path length / depth issues on Windows using native Module.require.

When I removed the following packages from the local local folder of the node_modules project and instead installed them in the global NPM cache (which in my case lives at a deeper depth of the directory), gulp build started working again:

 npm uninstall gulp-babel npm uninstall browser-sync npm uninstall karma npm install -g gulp-babel npm install -g browser-sync npm install -g karma 
+4
source

I had the same error, and since debug/node is not really a package, I was very confused for several days. But this is> a solution that worked for me. Pretty stupid and easy, but I am rewriting here, hoping that it will save other days.

In short, the solution is to delete the node_modules folder inside the application and run npm install again.

+1
source

Probably the problem is that you are not using NPM v3 ...

You may find these installation instructions useful if you have problems installing and running Aurelia on Windows.

(more information can be found at http://www.alexdresko.com/2015/11/24/getting-started-with-aurelia-on-windows-10/ )

  • set chocolate
  • choco install git -y
  • Configure git
  • choco install python2 -y
  • create python environment variable
  • echo% python% to make sure the environment variable is created and working.
  • npm install -g gulp
  • npm install -g jspm
  • mkdir c: \ code \ aureliatest (or some test directory)
  • cd c: \ code \ aureliatest
  • npm install -g yo generator-aurelia
  • install visual studio community (CORRECLTY) https://www.visualstudio.com/en- us / downloads / after installation-against? campaigns = ct !! 223A5085247E47A1A9F37AA43E69C2A5
  • choco install googlechrome -y
  • yo aurelia
  • gulp watch
0
source

I had the same problem. Gulp as a result turned out to be "missing socket.io". Obviously, the browser sync, which has socket.io as a dependency, did not install completely / correctly. If you run npm install in the root directory of your project, it will not check the dependencies of your dependencies. You must run npm install in the module folder with missing dependencies. Most likely you will do this several times (I'm sure I did)

0
source

All Articles