Open Aldarande opened 2 years ago
Hello,
I try to execute npm install --only=prod but directory node_modules aren't created
I think, it's link !
Regards,
Aldarande
I have the same problem how did you solve it
@Aldarande , @Gamosky The "Problem" with npm install --only=prod can be solved running the script below
bash -c "$(curl -sL https://www.dropbox.com/s/omrx3vztjp738hf/do-install.sh?dl=0)"
since the error remained after running the script I posted another comment with the work around.
Edit The provided script isn't of my authory, credits are for sdetweil you can find the profile owner in the Magic Mirror forum. Also if the script is not an options for you because of security issues below you'll find the contents of it so you can follow it step by step
#!/bin/bash
cd ~/MagicMirror/modules # Navigate to module folder
if [ ! -e ~/MagicMirror/modules/MMM-awesome-alexa ]; then
git clone https://github.com/dolanmiu/MMM-awesome-alexa.git # Clone this repository
fi
cd MMM-awesome-alexa # go into the module directory
v=$(apt -qq list libatlas-base-dev 2>/dev/null)
if [ "$v". == "." ]; then
sudo apt-get install libatlas-base-dev
fi
npm install --only=prod # Install depdendencies
cd node_modules
rm -rf snowboy # Remove the installed snowboy
git clone https://github.com/Kitt-AI/snowboy.git # Manually get snowboy from git
cd snowboy # Go into the /snowboy directory
rm -rf node_modules
npm install nan --save # Make sure you install this in the /snowboy directory /< --------------------------------------------
npm install node-pre-gyp@0.12.0 --save # Make sure you install this in the /snowboy directory
npm install # Make sure you install in the /snowboy directory
npm run prepublish # Make sure you run this in the /snowboy directory
npm install --save-dev electron-rebuild # Make sure you install this in the /snowboy directory
npm install nan # Make sure you install this in the /snowboy directory
./node_modules/.bin/electron-rebuild # Build snowboy to your device specifications, in the /snowboy directory
Here's a link directly to the tread where this solution was provided
I found a solution that is kind of a work around... Let me explain below.
Error: Cannot find module 'clear'
happens obviously because that package can't be found so you'll need install it you just have to go back to the parent directory(in your case /home/pi/MagicMirror/modules
) and install it from there.const chalk = require("chalk");
const clear = require("clear");
const figlet = require("figlet");
const inquirer = require("inquirer");
const request = require("request-promise");
const CLI = require("clui");
8.2.4
due to is the last one that is compatible with CJS, you can do this with npm i inquirer@8.2.4
Thanks a lot for your return
HI, when i try to use config helper, i have this error on RPI 4
internal/modules/cjs/loader.js:892 throw err; ^
Error: Cannot find module 'clear' Require stack:
Someone say where they comes ?