MagicMirror² v2.12.0 is available! For more information about this release, check out this topic.

npm install error



  • I had a magic mirror folder (BeautyM) that It was installed 4 months ago.
    Updated to the latest version with the command “git pull origin master”. It works very well.

    And we created a new folder (BeautyBeauty). ever since
    “git init
    git remote add origin https://github.com/ENTITYSmartMirror/BeautyBeauty.git
    git pull origin master
    npm install
    npm start”
    I ran the command.
    However, the MMM_Globe module did not work in this folder (BeautyBeauty).
    I don’t know why folder(BeautyM) works well but folder(BeautyBeauty) didn’t work.

    0_1571771857185_a6455d02-d486-4984-8a47-03d9951e69ff-image.png
    This image is the result of a “git log” of each of the two folders. So the code for both folders is the same.

    0_1571772057017_c276f1e3-c87c-4048-9c79-6d1390a890ea-image.png
    This image is the result of the “npm start” of each twofolders.
    The red box is an error.

    error code is
    "ERROR! Could not validate main module js file.
    C:\Users\이지원\Desktop\BeautyBeauty\modules\MMM-Globe\MMM-Globe.js:84
    getDom: async function() {
    ^^^^^^^^
    SyntaxError: Unexpected token function
    at Object.exports.runInThisContext (vm.js:76:16)
    at Module._compile (module.js:528:28)
    at Object.Module._extensions…js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at Class.loadModuleDefaultConfig (C:\Users\이지원\Desktop\BeautyBeauty\modules\MMM-Remote-Control\node_helper.js:297:30)
    at fs.stat.err (C:\Users\이지원\Desktop\BeautyBeauty\modules\MMM-Remote-Control\node_helper.js:251:26)
    "

    I think there’s a problem with the “npm install.” Because BeautyM did “npm install” about 4 months ago, but BeautyBeauty did “npm install” today.

    An error occurs in folder(BeautyBeauty). But it works well in folder(BeautyM).
    0_1571773553316_2cdf53a4-630c-4973-ba08-e0d485c314f5-image.png

    0_1571773608876_f58f0d43-28fb-48ca-83a0-69692061faca-image.png

    The code for both folders is clearly the same. Also, “git status” is the same.
    Tell me why.



  • This post is deleted!


  • @seongwoolee the version of nodejs does not support async maybe?

    can u tell us output of

    node -v
    and 
    npm -v
    

    after update (git pull, npm install) , you would also have to run npm install in any module folder that has a package.json file, to update its dependencies

    what version is the original beautym package? see the version: ??? in the package.json file


Log in to reply