我正在遵循此处包含的步骤 https://facebook.github.io/react-native/docs/getting-started
ive安装了NPM的新副本,甚至完成了npm update
命令
i然后运行 npm install -g expo-cli
这给出了一大堆有关未安装Linux软件包的警告,但是IM运行Windows 10 Home 64bit,因此没有概率
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/ngrok-bin-darwin-ia32@2.2.8 (node_modulesexpo-clinode_modules@expongrok-bin-darwin-ia32):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/ngrok-bin-darwin-ia32@2.2.8: wanted {"os":"darwin","arch":"ia32"} (current: {"os":"win32","arch":"x64"})
i然后键入expo init HelloWorld
并获得以下错误
C:Users####AppDataRoamingnpmnode_modulesexpo-clinode_modulesformidablelibincoming_form.js:1
(function (exports, require, module, __filename, __dirname) { �d��.�
^
SyntaxError: Invalid or unexpected token
at new Script (vm.js:79:7)
at createScript (vm.js:251:10)
at Object.runInThisContext (vm.js:303:10)
at Module._compile (internal/modules/cjs/loader.js:657:28)
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)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
Uncaught Error C:Users####AppDataRoamingnpmnode_modulesexpo-clinode_modulesformidablelibincoming_form.js:1
(function (exports, require, module, __filename, __dirname) { �d��.�
^
SyntaxError: Invalid or unexpected token
at new Script (vm.js:79:7)
at createScript (vm.js:251:10)
at Object.runInThisContext (vm.js:303:10)
at Module._compile (internal/modules/cjs/loader.js:657:28)
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)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
我不知道为什么。它是一个干净的安装,我是否有安装我的东西?
使用了npm install formidable
,然后将结果文件夹复制到Expo具有解决问题的formidable
副本的位置。