Ошибка: отсутствует связывание при использовании ионной подачи - PullRequest
0 голосов
/ 04 июля 2019

Я пытаюсь служить своему ионному проекту. но когда я запускаю ionic serve, я получаю следующую ошибку!

Сборка модуля не удалась (из ./node_modules/sass-loader/lib/loader.js): [ng] Ошибка: отсутствует привязка /home/gideon/node_modules/node-sass/vendor/linux-x64-57/binding.node

Я пытался запустить "$ npm rebuild node-sass", но он все же дал мне ошибку. Я также удалил папку node-sass и снова запустил «$ npm install», но все равно не собирался и возвращал ту же ошибку.


ERROR in ./src/global.scss (./node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embedded!./node_modules/sass-loader/lib/loader.js??ref--14-3!./src/global.scss)
[ng] Module build failed (from ./node_modules/sass-loader/lib/loader.js):
[ng] Error: Missing binding /home/gideon/node_modules/node-sass/vendor/linux-x64-57/binding.node
[ng] Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 8.x
[ng] 
[ng] Found bindings for the following environments:
[ng]   - Linux 64-bit with Node.js 10.x
[ng] 
[ng] This usually happens because your environment has changed since running `npm install`.
[ng] Run `npm rebuild node-sass` to download the binding for your current environment.
[ng]     at module.exports (/home/gideon/node_modules/node-sass/lib/binding.js:15:13)
[ng]     at Object.<anonymous> (/home/gideon/node_modules/node-sass/lib/index.js:14:35)
[ng]     at Module._compile (module.js:653:30)
[ng]     at Object.Module._extensions..js (module.js:664:10)
[ng]     at Module.load (module.js:566:32)
[ng]     at tryModuleLoad (module.js:506:12)
[ng]     at Function.Module._load (module.js:498:3)
[ng]     at Module.require (module.js:597:17)
[ng]     at require (internal/module.js:11:18)
[ng]     at Object.sassLoader (/home/gideon/IONIC/ionic-news-app-master/node_modules/sass-loader/lib/loader.js:46:72)
[ng] ERROR in ./src/theme/variables.scss (./node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embedded!./node_modules/sass-loader/lib/loader.js??ref--14-3!./src/theme/variables.scss)
[ng] Module build failed (from ./node_modules/sass-loader/lib/loader.js):
[ng] Error: Missing binding /home/gideon/node_modules/node-sass/vendor/linux-x64-57/binding.node
[ng] Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 8.x
[ng] 
[ng] Found bindings for the following environments:
[ng]   - Linux 64-bit with Node.js 10.x
[ng] 
[ng] This usually happens because your environment has changed since running `npm install`.
[ng] Run `npm rebuild node-sass` to download the binding for your current environment.
[ng]     at module.exports (/home/gideon/node_modules/node-sass/lib/binding.js:15:13)
[ng]     at Object.<anonymous> (/home/gideon/node_modules/node-sass/lib/index.js:14:35)
[ng]     at Module._compile (module.js:653:30)
[ng]     at Object.Module._extensions..js (module.js:664:10)
[ng]     at Module.load (module.js:566:32)
[ng]     at tryModuleLoad (module.js:506:12)
[ng]     at Function.Module._load (module.js:498:3)
[ng]     at Module.require (module.js:597:17)
[ng]     at require (internal/module.js:11:18)
[ng]     at Object.sassLoader (/home/gideon/IONIC/ionic-news-app-master/node_modules/sass-loader/lib/loader.js:46:72)
[ng] ERROR in ./src/app/home/home.page.scss
[ng] Module build failed (from ./node_modules/sass-loader/lib/loader.js):
[ng] Error: Missing binding /home/gideon/node_modules/node-sass/vendor/linux-x64-57/binding.node
[ng] Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 8.x
[ng] 
[ng] Found bindings for the following environments:
[ng]   - Linux 64-bit with Node.js 10.x
[ng] 
[ng] This usually happens because your environment has changed since running `npm install`.
[ng] Run `npm rebuild node-sass` to download the binding for your current environment.
[ng]     at module.exports (/home/gideon/node_modules/node-sass/lib/binding.js:15:13)
[ng]     at Object.<anonymous> (/home/gideon/node_modules/node-sass/lib/index.js:14:35)
[ng]     at Module._compile (module.js:653:30)
[ng]     at Object.Module._extensions..js (module.js:664:10)
[ng]     at Module.load (module.js:566:32)
[ng]     at tryModuleLoad (module.js:506:12)
[ng]     at Function.Module._load (module.js:498:3)
[ng]     at Module.require (module.js:597:17)
[ng]     at require (internal/module.js:11:18)
[ng]     at Object.sassLoader (/home/gideon/IONIC/ionic-news-app-master/node_modules/sass-loader/lib/loader.js:46:72)
[ng] ℹ 「wdm」: Failed to compile.

ПОЖАЛУЙСТА, ДЕЙСТВИТЕЛЬНО НУЖНА ПОМОЩЬ! Кто-то, чтобы помочь мне! СПАСИБО ЗА ПРЕДЕЛА!

Ответы [ 2 ]

0 голосов
/ 05 июля 2019

Попробуйте это

rm -r node_modules
rm package-lock.json
npm install --save-dev node-sass ***or*** npm rebuild node-sass --force
npm install
0 голосов
/ 05 июля 2019

Шаги для решения проблемы Запустите

npm и перестройте node-sass

, чтобы создать привязку для текущей среды.

...