getting error : Found bindings for the following environments: - Linux 64-bit with Node.js 9.x in my ubuntu system
getting error : Found bindings for the following environments: - Linux 64-bit with Node.js 9.x in my ubuntu system
当我尝试在 React 中启动我的项目时,出现此错误,我正在使用 Ubuntu 系统
Found bindings for the following environments: - Linux 64-bit with Node.js 9.x
我正在使用 node -v : 10.13.0
和 npm -v : 6.11.2
,这里我也附上了我的 package.json 文件,谁能帮我解决这个问题?
{
"name": "gatsby-starter-hello-world",
"private": true,
"description": "A simplified bare-bones starter for Gatsby",
"version": "0.1.0",
"license": "0BSD",
"scripts": {
"build": "gatsby build",
"develop": "gatsby develop",
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"",
"start": "npm run develop",
"serve": "gatsby serve",
"clean": "gatsby clean",
"test": "echo \"Write tests! -> https://gatsby.dev/unit-testing\" && exit 1"
},
"dependencies": {
"classnames": "^2.2.6",
"gatsby": "^2.24.48",
"gatsby-background-image": "^1.1.2",
"gatsby-plugin-routes": "^1.0.0",
"gatsby-plugin-sass": "^2.3.12",
"gatsby-plugin-sharp": "^2.6.28",
"gatsby-source-filesystem": "^2.3.25",
"gatsby-transformer-sharp": "^2.5.13",
"node-sass": "^4.14.1",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-router-dom": "^5.0.1"
},
"devDependencies": {
"prettier": "2.0.5"
},
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby-starter-hello-world"
},
"bugs": {
"url": "https://github.com/gatsbyjs/gatsby/issues"
}
}
尝试删除您的 node_modules 并重新安装。您可能还想检查您的路径中是否没有 link NVM 或旧的 Node 9 版本,node-sass 在安装时正在拾取
你只需要使用:
npm rebuild node-sass
我建议在项目的根目录中添加一个 .nvmrc
文件以避免发生此错误。这是一个简单的文件,用于修复项目的 Node 版本,以避免版本之间不匹配并强制项目在特定版本下 运行。您只需要添加一个包含以下内容的 .nvmrc
文件:
v10.13.0
当我尝试在 React 中启动我的项目时,出现此错误,我正在使用 Ubuntu 系统
Found bindings for the following environments: - Linux 64-bit with Node.js 9.x
我正在使用 node -v : 10.13.0
和 npm -v : 6.11.2
,这里我也附上了我的 package.json 文件,谁能帮我解决这个问题?
{
"name": "gatsby-starter-hello-world",
"private": true,
"description": "A simplified bare-bones starter for Gatsby",
"version": "0.1.0",
"license": "0BSD",
"scripts": {
"build": "gatsby build",
"develop": "gatsby develop",
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"",
"start": "npm run develop",
"serve": "gatsby serve",
"clean": "gatsby clean",
"test": "echo \"Write tests! -> https://gatsby.dev/unit-testing\" && exit 1"
},
"dependencies": {
"classnames": "^2.2.6",
"gatsby": "^2.24.48",
"gatsby-background-image": "^1.1.2",
"gatsby-plugin-routes": "^1.0.0",
"gatsby-plugin-sass": "^2.3.12",
"gatsby-plugin-sharp": "^2.6.28",
"gatsby-source-filesystem": "^2.3.25",
"gatsby-transformer-sharp": "^2.5.13",
"node-sass": "^4.14.1",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-router-dom": "^5.0.1"
},
"devDependencies": {
"prettier": "2.0.5"
},
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby-starter-hello-world"
},
"bugs": {
"url": "https://github.com/gatsbyjs/gatsby/issues"
}
}
尝试删除您的 node_modules 并重新安装。您可能还想检查您的路径中是否没有 link NVM 或旧的 Node 9 版本,node-sass 在安装时正在拾取
你只需要使用:
npm rebuild node-sass
我建议在项目的根目录中添加一个 .nvmrc
文件以避免发生此错误。这是一个简单的文件,用于修复项目的 Node 版本,以避免版本之间不匹配并强制项目在特定版本下 运行。您只需要添加一个包含以下内容的 .nvmrc
文件:
v10.13.0