Problem when using generator-rn-toolbox to apply icon - react-native

I use generator-rn-toolbox to set icon and splash screen for my react-native app as instructions
- install generator npm install -g yo generator-rn-toolbox
- install brew brew install imagemagick
- generate icons yo rn-toolbox:assets --icon ~/Desktop/logo.png
Then I encountered an error as below
internal/modules/cjs/loader.js:584
throw err;
^
Error: Cannot find module 'universal-analytics'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
at Function.Module._load (internal/modules/cjs/loader.js:508:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/usr/local/lib/node_modules/generator-rn-toolbox/analytics.js:1:74)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/usr/local/lib/node_modules/generator-rn-toolbox/generators/assets/index.js:5:19)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
I tried to run npm install universal-analytics but it doesn't work. Do you have any solutions?

I solved by
npm remove -g yo generator-rn-toolbox
npm install -g yo generator-rn-toolbox
We look forward to helping you

Related

webpack-cli can't find webpack module

i have installed webpack globally and when i run webpack it says
One CLI for webpack must be installed. These are recommended choices, delivered as separate packages:
- webpack-cli (https://github.com/webpack/webpack-cli)
The original webpack full-featured CLI.
We will use "npm" to install the CLI via "npm install -D".
Do you want to install 'webpack-cli' (yes/no):
and I say yes, the webpack-cli seems to be installed correctly but i got an error message that says
{ Error: Cannot find module 'webpack'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
at Function.Module._load (internal/modules/cjs/loader.js:508:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (C:\Users\TOSHIBA\node_modules\v8-compile-cache\v8-compile-cache.js:159:20)
at Object.<anonymous> (C:\Users\TOSHIBA\node_modules\webpack-cli\bin\convert-argv.js:7:24)
at Module._compile (C:\Users\TOSHIBA\node_modules\v8-compile-cache\v8-compile-cache.js:178:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at yargs.parse (C:\Users\TOSHIBA\node_modules\webpack-cli\bin\cli.js:228:14)
at Object.parse (C:\Users\TOSHIBA\node_modules\yargs\yargs.js:567:18)
at C:\Users\TOSHIBA\node_modules\webpack-cli\bin\cli.js:206:8
at Object.<anonymous> (C:\Users\TOSHIBA\node_modules\webpack-cli\bin\cli.js:505:3)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at runCommand.then (C:\Users\TOSHIBA\AppData\Roaming\npm\node_modules\webpack\bin\webpack.js:143:5)
at process._tickCallback (internal/process/next_tick.js:68:7) code: 'MODULE_NOT_FOUND' }
what is possibility goes wrong?
Try to npm link webpack-cli to Link Globally installed package of your project

Cannot find module 'cli-cursor' vue-cli

i installed vue-cli
but when i run
vue create -f name
i get this error :
internal/modules/cjs/loader.js:583
throw err;
^
Error: Cannot find module 'cli-cursor'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (C:\Users\mrkinix\AppData\Roaming\npm\node_modules\#vue\cli\node_modules\inquirer\lib\prompts\list.js:9:17) at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3)
PS D:\New folder>
Install cli-cursor globally using npm or yarn:
$ npm install -g cli-cursor
or,
$ yarn global add cli-cursor

Why can I not start the Vue UI after installing the Vue CLI?

Using the following:
node 8.11.2
npm 6.3.0
I then try to install the Vue CLI (#vue/cli#3.0.0):
npm i -g #vue/cli
but when I run the following command:
vue ui
I get the following error:
Error: Cannot find module 'core-js/modules/es7.object.entries'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (C:\Apps\caches\npm\node_modules\#vue\cli\node_modules\apollo-upload-server\lib\mi
ddleware.js:14:1)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
It turned out I had to install the core-js package explicitly.
npm i -g core-js
Not sure why this wasn't installed as a dependency though.
The issue has been reported HERE and has been fixed in v3.0.1.

npm install express-generator

I am trying to install an express node-postgres application, but I am getting the following error:
module.js:549
throw err;
^
Error: Cannot find module 'sorted-object'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/usr/local/lib/node_modules/express-
generator/bin/express-cli.js:10:20)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
I am not sure where to go to look for the solution to this error. Should I just delete and reinstall node and npm or is it more simple than that?

Yeoman Yo WebApp Generator Issue

I am trying to generate a WebApp using Yeoman Yo Command but I keep getting following error:
pdclap-2stjvs1:ShippingSolutionPlain administrator$ yo webapp
Error: Cannot find module './lib/env'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/usr/local/lib/node_modules/generator-webapp/node_modules/yeoman-generator/index.js:7:19)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
pdclap-2stjvs1:ShippingSolutionPlain administrator$
Is it an environment variable issue?
Seems like a npm issue. Maybe it didn't copy all files or didn't install a dependency.
Install the latest version of both npm and yo, and retry.