Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

无法使用 npm run build:h5 编译成H5页面 #8760

Closed
icepy opened this issue Feb 26, 2021 · 9 comments
Closed

无法使用 npm run build:h5 编译成H5页面 #8760

icepy opened this issue Feb 26, 2021 · 9 comments
Labels
F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x

Comments

@icepy
Copy link

icepy commented Feb 26, 2021

相关平台

H5

复现仓库

https://github.com/icepy
浏览器版本: Chrome 88.0.4324.192
使用框架: React

复现步骤

使用 @tarojs/cli 安装一个干净的项目,然后运行 npm run build:h5

【重现链接请忽略,因为不填写不让提交】

期望结果

既可以打包小程序,也可以打包h5

实际结果

#
# Fatal error in , line 0
# Check failed: allocator->SetPermissions(reinterpret_cast<void*>(region.begin()), region.size(), PageAllocator::kNoAccess).
#
#
#
#FailureMessage Object: 0x16d4b8ab8
 1: 0x102a42218 node::NodePlatform::GetStackTracePrinter()::$_3::__invoke() [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
 2: 0x103784608 V8_Fatal(char const*, ...) [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
 3: 0x1030d7efc v8::internal::wasm::WasmCodeManager::Decommit(v8::base::AddressRegion) [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
 4: 0x1030db57c v8::internal::wasm::NativeModule::FreeCode(v8::internal::Vector<v8::internal::wasm::WasmCode* const>) [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
 5: 0x1030ea764 v8::internal::wasm::WasmEngine::FreeDeadCodeLocked(std::__1::unordered_map<v8::internal::wasm::NativeModule*, std::__1::vector<v8::internal::wasm::WasmCode*, std::__1::allocator<v8::internal::wasm::WasmCode*> >, std::__1::hash<v8::internal::wasm::NativeModule*>, std::__1::equal_to<v8::internal::wasm::NativeModule*>, std::__1::allocator<std::__1::pair<v8::internal::wasm::NativeModule* const, std::__1::vector<v8::internal::wasm::WasmCode*, std::__1::allocator<v8::internal::wasm::WasmCode*> > > > > const&) [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
 6: 0x1030e846c v8::internal::wasm::WasmEngine::PotentiallyFinishCurrentGC() [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
 7: 0x1030e98e0 v8::internal::wasm::WasmEngine::ReportLiveCodeForGC(v8::internal::Isolate*, v8::internal::Vector<v8::internal::wasm::WasmCode*>) [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
 8: 0x1030e9c90 v8::internal::wasm::WasmEngine::ReportLiveCodeFromStackForGC(v8::internal::Isolate*) [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
 9: 0x102c736bc v8::internal::StackGuard::HandleInterrupts() [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
10: 0x102faeb94 v8::internal::Runtime_StackGuard(int, unsigned long*, v8::internal::Isolate*) [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
11: 0x10329fecc Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
12: 0x10327a860 Builtins_MapPrototypeGet [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
13: 0x103238bd4 Builtins_InterpreterEntryTrampoline [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
14: 0x146ae54f04c0
15: 0x103230204 Builtins_ArgumentsAdaptorTrampoline [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
16: 0x103238bd4 Builtins_InterpreterEntryTrampoline [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
17: 0x146ae5625364
18: 0x146ae58247a4
19: 0x103238bd4 Builtins_InterpreterEntryTrampoline [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
20: 0x103238bd4 Builtins_InterpreterEntryTrampoline [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
21: 0x103238bd4 Builtins_InterpreterEntryTrampoline [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
22: 0x103230204 Builtins_ArgumentsAdaptorTrampoline [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
23: 0x103238bd4 Builtins_InterpreterEntryTrampoline [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
24: 0x103230204 Builtins_ArgumentsAdaptorTrampoline [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
25: 0x1032ec15c Builtins_PromiseFulfillReactionJob [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
26: 0x103257d48 Builtins_RunMicrotasks [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
27: 0x103236368 Builtins_JSRunMicrotasksEntry [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
28: 0x128008000

环境信息

👽 Taro v3.0.21


  Taro CLI 3.0.21 environment info:
    System:
      OS: macOS 11.2
      Shell: 5.8 - /bin/zsh
    Binaries:
      Node: 15.5.0 - ~/.nvm/versions/node/v15.5.0/bin/node
      Yarn: 1.22.10 - ~/.nvm/versions/node/v15.5.0/bin/yarn
      npm: 7.3.0 - ~/.nvm/versions/node/v15.5.0/bin/npm
    npmPackages:
      @tarojs/cli: 3.0.21 => 3.0.21
      @tarojs/components: 3.0.21 => 3.0.21
      @tarojs/mini-runner: 3.0.21 => 3.0.21
      @tarojs/react: 3.0.21 => 3.0.21
      @tarojs/runtime: 3.0.21 => 3.0.21
      @tarojs/taro: 3.0.21 => 3.0.21
      @tarojs/webpack-runner: 3.0.21 => 3.0.21
      babel-preset-taro: 3.0.21 => 3.0.21
      eslint-config-taro: 3.0.21 => 3.0.21
      react: ^16.10.0 => 16.14.0
@taro-bot2 taro-bot2 bot added F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x labels Feb 26, 2021
@Chen-jj
Copy link
Contributor

Chen-jj commented Feb 26, 2021

升级到最新版再试试

@icepy
Copy link
Author

icepy commented Feb 26, 2021

升级到最新版再试试

升级到了3.1.0,依然错误:

#
# Fatal error in , line 0
# Check failed: allocator->SetPermissions(reinterpret_cast<void*>(region.begin()), region.size(), PageAllocator::kNoAccess).
#
#
#
#FailureMessage Object: 0x16d100ee8
 1: 0x102dfa218 node::NodePlatform::GetStackTracePrinter()::$_3::__invoke() [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
 2: 0x103b3c608 V8_Fatal(char const*, ...) [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
 3: 0x10348fefc v8::internal::wasm::WasmCodeManager::Decommit(v8::base::AddressRegion) [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
 4: 0x10349357c v8::internal::wasm::NativeModule::FreeCode(v8::internal::Vector<v8::internal::wasm::WasmCode* const>) [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
 5: 0x1034a2764 v8::internal::wasm::WasmEngine::FreeDeadCodeLocked(std::__1::unordered_map<v8::internal::wasm::NativeModule*, std::__1::vector<v8::internal::wasm::WasmCode*, std::__1::allocator<v8::internal::wasm::WasmCode*> >, std::__1::hash<v8::internal::wasm::NativeModule*>, std::__1::equal_to<v8::internal::wasm::NativeModule*>, std::__1::allocator<std::__1::pair<v8::internal::wasm::NativeModule* const, std::__1::vector<v8::internal::wasm::WasmCode*, std::__1::allocator<v8::internal::wasm::WasmCode*> > > > > const&) [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
 6: 0x1034a046c v8::internal::wasm::WasmEngine::PotentiallyFinishCurrentGC() [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
 7: 0x1034a18e0 v8::internal::wasm::WasmEngine::ReportLiveCodeForGC(v8::internal::Isolate*, v8::internal::Vector<v8::internal::wasm::WasmCode*>) [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
 8: 0x1034a1c90 v8::internal::wasm::WasmEngine::ReportLiveCodeFromStackForGC(v8::internal::Isolate*) [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
 9: 0x10302b6bc v8::internal::StackGuard::HandleInterrupts() [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
10: 0x103366b94 v8::internal::Runtime_StackGuard(int, unsigned long*, v8::internal::Isolate*) [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
11: 0x103657ecc Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
12: 0x1035f0c70 Builtins_InterpreterEntryTrampoline [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
13: 0x1035f0bd4 Builtins_InterpreterEntryTrampoline [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
14: 0x1035f0bd4 Builtins_InterpreterEntryTrampoline [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
15: 0x1035f0bd4 Builtins_InterpreterEntryTrampoline [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
16: 0x10361cfd4 Builtins_AsyncFunctionAwaitResolveClosure [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
17: 0x1036a415c Builtins_PromiseFulfillReactionJob [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
18: 0x10360fd48 Builtins_RunMicrotasks [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
19: 0x1035ee368 Builtins_JSRunMicrotasksEntry [/Users/xiangwenwen/.nvm/versions/node/v15.5.0/bin/node]
20: 0x140008000

Taro info:

👽 Taro v3.1.0


  Taro CLI 3.1.0 environment info:
    System:
      OS: macOS 11.2
      Shell: 5.8 - /bin/zsh
    Binaries:
      Node: 15.5.0 - ~/.nvm/versions/node/v15.5.0/bin/node
      Yarn: 1.22.10 - ~/.nvm/versions/node/v15.5.0/bin/yarn
      npm: 7.3.0 - ~/.nvm/versions/node/v15.5.0/bin/npm
    npmPackages:
      @tarojs/cli: 3.1.0 => 3.1.0
      @tarojs/components: 3.1.0 => 3.1.0
      @tarojs/mini-runner: 3.1.0 => 3.1.0
      @tarojs/react: 3.1.0 => 3.1.0
      @tarojs/runtime: 3.1.0 => 3.1.0
      @tarojs/taro: 3.1.0 => 3.1.0
      @tarojs/webpack-runner: 3.1.0 => 3.1.0
      babel-preset-taro: 3.1.0 => 3.1.0
      eslint-config-taro: 3.1.0 => 3.1.0
      react: ^16.10.0 => 16.14.0

@icepy
Copy link
Author

icepy commented Feb 26, 2021

我的是 M1 芯片

@Chen-jj
Copy link
Contributor

Chen-jj commented Feb 26, 2021

切node14试试

@icepy
Copy link
Author

icepy commented Feb 26, 2021

切node14试试

14 不支持 M1 😂

@Chen-jj
Copy link
Contributor

Chen-jj commented Feb 26, 2021

nodejs 社区搜索一下这个报错看看

@icepy
Copy link
Author

icepy commented Feb 26, 2021

nodejs 社区搜索一下这个报错看看

好,我正在node社区看这个问题

@icepy
Copy link
Author

icepy commented Feb 26, 2021

@Chen-jj 基本看了一下,这个问题暂时无解,不是taro的问题 nodejs/node#37061

@goldEli
Copy link

goldEli commented May 7, 2021

切node14试试

14 不支持 M1 😂

网上说 14 不支持 m1,我也是装的v16,也出现无法编译的问题。

后来直接在node官网下载14安装(安装时系统会自动转码的)

安好后能成功编译h5页面了😄

image
image

@ZakaryCode ZakaryCode moved this to Done in H5 Apr 10, 2023
@ZakaryCode ZakaryCode added this to H5 Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x
Projects
Archived in project
Development

No branches or pull requests

3 participants