【问题标题】:compiled against a different Node.js version using NODE_MODULE_VERSION 64. This version of Node.js requires NODE_MODULE_VERSION 67使用 NODE_MODULE_VERSION 64 针对不同的 Node.js 版本编译。此版本的 Node.js 需要 NODE_MODULE_VERSION 67
【发布时间】:2019-12-03 01:09:57
【问题描述】:

npm 安装成功。 npm start 抛出以下错误。

不依赖 bcrpt 和 node-pre-gyp 从类似的问题中关注大多数 cmets,例如清理缓存、重建、删除节点模块并再次安装,但没有一个对我有用。 Node版本有问题吗? 节点:11.15.0 npm:6.7.0

** npm start 上的错误消息 **

Module build failed (from ../node_modules/sass-loader/lib/loader.js):
Error: The module '\\?\D:\_Install\win32-x64-64_binding.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 64. This version of Node.js requires
NODE_MODULE_VERSION 67. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:857:18)
    at Module.load (internal/modules/cjs/loader.js:685:32)
    at Function.Module._load (internal/modules/cjs/loader.js:620:12)
    at Module.require (internal/modules/cjs/loader.js:723:19)
    at require (internal/modules/cjs/helpers.js:14:16)
    at module.exports (C:\Users\syedabu.c\Downloads\ReactJSBlueprint\node_modules\node-sass\lib\binding.js:19:10)
    at Object.<anonymous> (C:\Users\syedabu.c\Downloads\ReactJSBlueprint\node_modules\node-sass\lib\index.js:14:35)
    at Module._compile (internal/modules/cjs/loader.js:816:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)
    at Module.load (internal/modules/cjs/loader.js:685:32)
 @ ./styles/main.scss 2:14-145 21:1-42:3 22:19-150
 @ ./src/index.jsx
 @ multi @babel/polyfill react-hot-loader/patch react-dev-utils/webpackHotDevClient react-error-overlay ./src/index.jsx```

Expected to start without error. Please help me to resolve.

【问题讨论】:

标签: node.js reactjs create-react-app node-sass sass-loader


【解决方案1】:

我也面临同样的问题。 但这种方法对我有用。 您必须安装所需的 nodejs 版本。 在你的情况下,你必须安装 NODE_MODULE_VERSION 67 这意味着你必须安装节点版本 11.0.0 到 11.15.0 。(你可以从这个链接知道版本https://nodejs.org/en/download/releases/) 一旦安装。 您只需在终端中键入此命令。 npm 重建

【讨论】:

    猜你喜欢
    • 2022-01-06
    • 2020-12-22
    • 2018-03-05
    • 2018-11-21
    • 2021-04-18
    • 2021-02-19
    • 1970-01-01
    • 2019-07-28
    相关资源
    最近更新 更多