Cannot find module 'C:\Users\<username>\Documents\<projectPath>\client\tools\tasks\seed\noop'
All of sudden the npm start command started throwing the following exception. Nothing has changed the system environment. Restarted the machine. but no luck.
[15:04:57] Error: Cannot find module '<projectpath>\client\tools\tasks\seed\noop'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:286:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Gulp.<anonymous> (<projectpath>\client\tools\utils\seed\tasks_tools.js:107:34)
at module.exports (<projectpath>\client\node_modules\orchestrator\lib\runTask.js:34:7)
at Gulp.Orchestrator._runTask (<projectpath>\client\node_modules\orchestrator\index.js:273:3)
at Gulp.Orchestrator._runStep (<projectpath>\client\node_modules\orchestrator\index.js:214:10)
at Gulp.Orchestrator.start (<projectpath>\client\node_modules\orchestrator\index.js:134:8)
at runNextSet (<projectpath>\client\node_modules\run-sequence\index.js:86:16)
[15:04:57] 'serve.dev' errored after 234 ms
[15:04:57] Error in plugin 'run-sequence(noop)'
Message:
Cannot find module '<projectpath>\client\tools\tasks\seed\noop'
Details:
code: MODULE_NOT_FOUND
Stack:
Error: Cannot find module '<projectpath>\client\tools\tasks\seed\noop'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:286:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Gulp.<anonymous> (<projectpath>\client\tools\utils\seed\tasks_tools.js:107:34)
at module.exports (<projectpath>\client\node_modules\orchestrator\lib\runTask.js:34:7)
at Gulp.Orchestrator._runTask (<projectpath>\client\node_modules\orchestrator\index.js:273:3)
at Gulp.Orchestrator._runStep (<projectpath>\client\node_modules\orchestrator\index.js:214:10)
at Gulp.Orchestrator.start (<projectpath>\client\node_modules\orchestrator\index.js:134:8)
at runNextSet (<projectpath>\client\node_modules\run-sequence\index.js:86:16)
[15:04:57] 'build.dev' errored after 488 ms
[15:04:57] Error in plugin 'run-sequence(serve.dev)'
Could be related to npm. Have you upgraded it or reinstalled the project's dependencies?
The build also fails on any reason. Probably something related.
@saikiranmandhala also try: npm cache clean && npm i again. If you're with [email protected] everything should work (as you can see in AppVeyor).
@mgechev absolutely there is no change in the environment, my npm version is 4.2.0 and the node is v4.1.1
Let me know what happens after you clean the cache and reinstall the dependencies.
@mgechev this is what i am getting now after npm cache clean && npm i
[15:48:09] 'check.versions' errored after 6.9 ms
[15:48:09] Error: Cannot find module '
@mgechev The issue is switching between 'check.versions' and 'noop'
Error: Cannot find module '
Not sure where this may come from. I suppose something with ts-node/register.
updated to [email protected] and tried npm cache clean and npm install. Even now i am facing the same issue.
@mgechev You can close this issue. I fixed it though i could not find the root cause .
Work around - Copied the AppData\Roaming\npm and AppData\Roaming\npm-cache from another machine. I believe something was wrong with my npm cache folder though there was no change in the env. And this is no where related to the seed.
Thanks for sharing!
@mgechev , I can re-create this problem quite easily using the current Seed on Windows 8.1 by following the instructions for 'speeding up the build on Windows':
- run
tsc --project tsconfig.json - run
npm start
I get the same errors posted by @saikiranmandhala at the beginning of this issue.
The fix is also simple: delete *.js and *.js.map files in the following directories:
.(do NOT deletekarma.conf.js,protractor.conf.js,test-main.js, andtest-confiig.js)tools,tools/config,tools/tasks,tools/utils,src/client/app(operators.jsandjs.map)
Unfortunately, this means that (at least on Windows) the two ways of 'building the tools' are broken in the current Seed. npm run gulp build.tools does not currently work for me either due to #1892.
I was having the same problem, the solution that I found was install the dependencies with yarn.
I'm running on a machine with Windows 8!
Still having this problem on Windows 10, even with yarn as pkg-manager. (Yarn and the speed improvements from the wiki reduced build time drastically though)
Have been having the same Error: cannot find modules .....what can I do