MacBook M1
andtaro
Error: YarnDev: H5 error: YarnDev: H5
## There is an issue with `node-fibers` ##
`/node_modules/fibers/bin/darwin-arm64-88/fibers.node` is missing.
Try running this to fix the issue: .nvm/versions/node/v15.5.0/bin/node /node_modules/fibers/build
Error: Cannot find module 'node_modules/fibers/bin/darwin-arm64-88/fibers'
Copy the code
Looking for a long time didn’t find a solution, know to find a similar problem: www.jianshu.com/p/145015d72…
The solution
My environment is as follows: Node: v15.14.0 taro- CLI: v3.2.8
First look at the error message:
## There is an issue with `node-fibers` ##
`/node_modules/fibers/bin/darwin-arm64-88/fibers.node` is missing.
Try running this to fix the issue: .nvm/versions/node/v15.14.0/bin/node /node_modules/fibers/build
Error: Cannot find module 'node_modules/fibers/bin/darwin-arm64-88/fibers'
Copy the code
Perform/Users/XXX /. NVM/versions/node/v15.14.0 / bin/node/Users / / XXX XXX/node_modules/fibers/build could not find the Darwin fibers – arm64-88
- Execute in the project directory
find . -name fibers.node
, to see if the output path is availabledarwin-arm64-88
If not, proceed to Step 2 - Do this manually in the project directory
/ Users/XXX/NVM/versions/node/v15.14.0 / bin/node/Users / / XXX XXX/node_modules/fibers/build
, output promptnode-gyp not found! Please ensure node-gyp is in your PATH--
- perform
npm install -g node-gyp
The installationnode-gyp
- Performed again
/ Users/XXX/NVM/versions/node/v15.14.0 / bin/node/Users / / XXX XXX/node_modules/fibers/build
, an error is reportedbinding.gyp not found
- Execute in project directory
find . -name binding.gyp
, you’ll findnode_modules/fibers/binding.gyp
This file exists in the project - Item directory
cd node_modules/fibers
And then execute it again/ Users/XXX/NVM/versions/node/v15.14.0 / bin/node/Users / / XXX XXX/node_modules/fibers/build
If nothing goes wrong, it should compile at this point. - then
cd .. /..
, the implementation ofyarn dev:h5
Successfully started.