问题描述
我使用generator-rn-toolbox设置我的react-native应用程序的图标和启动屏幕-安装生成器 npm install -g yo generator-rn-toolbox
-安装brew 酿造安装imagemagick
-生成图标 yo rn-toolbox:assets --icon〜/Desktop/logo.png
然后我遇到了如下错误
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)
我尝试运行 npm install Universal-analytics
,但是它不起作用.有什么解决办法吗?
I tried to run npm install universal-analytics
but it doesn't work. Do you have any solutions?
推荐答案
我通过
-
npm remove -g yo generator-rn-toolbox
npm install -g yo generator-rn-toolbox
我们期待为您提供帮助
这篇关于使用generator-rn-toolbox应用图标时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!