[DOCU-2661] when running npm start I got an error on a fresh mac Created: 23/Feb/23  Updated: 11/Jul/23  Resolved: 11/Jul/23

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Sergio Marino Assignee: Martin DrĂ¡pela
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File image-2023-07-11-11-35-28-504.png    
Documentation page URL: https://docs.magnolia-cms.com/headless/getting-started-with-magnolia-headless/hello-spa.html

 Description   

"npm run install" seemed to work fine.
"npm start" threw me the following error:

node:internal/modules/cjs/loader:1078
  throw err;
  ^

Error: Cannot find module 'unpipe'

So after googling a bit I've found the following:
https://stackoverflow.com/questions/9023672/how-do-i-resolve-cannot-find-module-error-using-node-js?page=1&tab=scoredesc#tab-top

I made it work after:
1) deleting node_modules folder
2) running "npm run install -g" => I guess from the previous URL global installation allows you to use the module under any directory
3) running "npm run install" => so the node_modules folder is again generated

So I would just add a documentation tip something in case they face that error they need to follow these 3 steps.



 Comments   
Comment by Christopher Zimmermann [ 10/Jul/23 ]

I could not reproduce the error - I tried on the "react-minimal". Which project are you trying?

My version of node is 18.16. Maybe try that?

But regardless of the caause problem - we should not `npm run install -g` for the demo project, that would installl the demo project globally - which would be bad.

Comment by Martin DrĂ¡pela [ 11/Jul/23 ]

Dear smarino , pls try updating your libs. We have tested the procedure on two separate Apple machines and it worked without an issue on both of them.

The following table shows the minimum expectations for the FE helper libraries:

For now, I'm closing this ticket without a doc update, but feel free to reopen it or contact us again if the issue persists.

Generated at Mon Feb 12 01:29:07 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.