1

I am getting following stack trace while executing gulp package-solution.

I can't create package due to this error.

>gulp package-solution
{ Error: Cannot find module '@microsoft/gulp-core-build-serve'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (\node_modules\@microsoft\sp-build-web\lib\index.js:8:10)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (\gulpfile.js:4:15)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32) code: 'MODULE_NOT_FOUND' }
[14:57:51] Error - Unknown
 Cannot find module '@microsoft/gulp-core-build-serve'
[14:57:52] ==================[ Finished ]==================
[14:57:52] Project weather version: 0.0.1
[14:57:52] Build tools version: 2.5.3
[14:57:52] Node version: v8.0.0
[14:57:52] Total duration: 2.72 s
[14:57:52] Task errors: 2

Which tools I am missing?

  • Have you tried removing the node_modules folder and restoring dependencies using the npm install command? – Waldek Mastykarz - MVP Jun 6 '17 at 7:14
  • No.I haven't tried that but I have uninstalled node v8.0 and installed v6.10.3. – SynozeN Technologies Jun 6 '17 at 7:29
  • Try reinstalling dependencies by removing the node_modules folder and running the npm install command. – Waldek Mastykarz - MVP Jun 7 '17 at 9:53
1

Looking at your error log, it seems you are using the incorrect version of Node.

According to this - Set up your SharePoint client-side web part development environment, you need to install the LTS version of Node. The latest LTS version is v6.10.3.

I would suggest that you uninstall the current Node js installation and then reinstall with the LTS version and then check.

Download link - Latest LTS Version: v6.10.3

  • again getting same error : Cannot find module '@microsoft/gulp-core-build-serve' – SynozeN Technologies Jun 5 '17 at 10:50
  • can you create a new sample project and check ? – Gautam Sheth Jun 5 '17 at 10:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.