Конфликт пакетов Firebase и ng2-ion-range-slider в Angular - PullRequest
0 голосов
/ 19 сентября 2018

Я использую Angular и Firebase (+ облачные функции) и в своем веб-приложении я также добавил слайдер ng2-ion-range-slider из npm, чтобы расширить свой пользовательский интерфейс.Но что я заметил, так это то, что после установки ползунка диапазона я не могу развернуть облачные функции в firebase.

Возможно, существует абсолютная ошибка в ползунке диапазона, но мне нужно разрешить этот конфликт с помощью некоторого обходного пути.

после выполнения команды ниже в папке / functions;

развертывание firebase - только функции

Я получаю сообщение об ошибке ниже.Даже удаление слайдера диапазона из npm все равно не работает.Что-то повредило мою структуру пакета node_module, но я не смог ее найти ..

Вот мой tsconfig.file

{
  "compileOnSave": false,
  "compilerOptions": {
    "baseUrl": "./",
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "module": "es2015",
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "target": "es5",
    "typeRoots": [
      "node_modules/@types"
    ],
    "lib": [
      "es2017",
      "dom"
    ]
  }
}

Вот ошибка:

MacBook-Pro:PRO YI$ cd functions/
MacBook-Pro:PRO :functions YI$ firebase deploy --only functions

=== Deploying to 'firebaseproject'...

i  deploying functions
Running command: npm --prefix "$RESOURCE_DIR" run lint

> functions@ lint /Users/YI/Desktop/PRO/functions
> tslint --project tsconfig.json

Running command: npm --prefix "$RESOURCE_DIR" run build

> functions@ build /Users/YI/Desktop/PRO/functions
> tsc

../node_modules/@types/jquery/index.d.ts(191,29): error TS2304: Cannot find name 'XMLHttpRequest'.
../node_modules/@types/jquery/index.d.ts(512,41): error TS2304: Cannot find name 'Event'.
../node_modules/@types/jquery/index.d.ts(517,20): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(527,21): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(552,20): error TS2304: Cannot find name 'Event'.
../node_modules/@types/jquery/index.d.ts(562,20): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(582,13): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(946,34): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(954,15): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(962,20): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(1001,36): error TS2304: Cannot find name 'Document'.
../node_modules/@types/jquery/index.d.ts(1048,22): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(1056,19): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(1063,19): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(1072,22): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(1080,22): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(1089,20): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(1098,20): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(1107,20): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(1116,25): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(1193,25): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(1193,45): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(1311,32): error TS2304: Cannot find name 'Window'.
../node_modules/@types/jquery/index.d.ts(1318,20): error TS2304: Cannot find name 'Node'.
../node_modules/@types/jquery/index.d.ts(1380,29): error TS2304: Cannot find name 'XMLDocument'.
../node_modules/@types/jquery/index.d.ts(1404,22): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(1414,39): error TS2304: Cannot find name 'HTMLElement'.
../node_modules/@types/jquery/index.d.ts(1424,39): error TS2304: Cannot find name 'Document'.
../node_modules/@types/jquery/index.d.ts(1439,70): error TS2304: Cannot find name 'XMLHttpRequest'.
../node_modules/@types/jquery/index.d.ts(1474,69): error TS2304: Cannot find name 'XMLHttpRequest'.
../node_modules/@types/jquery/index.d.ts(1484,115): error TS2304: Cannot find name 'XMLHttpRequest'.
../node_modules/@types/jquery/index.d.ts(3077,14): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(3121,34): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(3121,42): error TS2304: Cannot find name 'DocumentFragment'.
../node_modules/@types/jquery/index.d.ts(3121,59): error TS2304: Cannot find name 'Text'.
../node_modules/@types/jquery/index.d.ts(3128,57): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(3137,35): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(3137,43): error TS2304: Cannot find name 'DocumentFragment'.
../node_modules/@types/jquery/index.d.ts(3137,60): error TS2304: Cannot find name 'Text'.
../node_modules/@types/jquery/index.d.ts(3144,58): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(3152,35): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(3161,35): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(3161,43): error TS2304: Cannot find name 'DocumentFragment'.
../node_modules/@types/jquery/index.d.ts(3161,60): error TS2304: Cannot find name 'Text'.
../node_modules/@types/jquery/index.d.ts(3168,58): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(3199,38): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(3199,46): error TS2304: Cannot find name 'Text'.
../node_modules/@types/jquery/index.d.ts(3207,39): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(3207,47): error TS2304: Cannot find name 'Text'.
../node_modules/@types/jquery/index.d.ts(3216,36): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(3216,44): error TS2304: Cannot find name 'DocumentFragment'.
../node_modules/@types/jquery/index.d.ts(3216,61): error TS2304: Cannot find name 'Text'.
../node_modules/@types/jquery/index.d.ts(3223,59): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(3231,36): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(3247,37): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(3255,42): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(3255,50): error TS2304: Cannot find name 'Text'.
../node_modules/@types/jquery/index.d.ts(3262,29): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(3289,16): error TS2304: Cannot find name 'HTMLElement'.
../node_modules/@types/jquery/index.d.ts(3303,34): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(3318,37): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(3333,39): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(3348,38): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(3356,25): error TS2304: Cannot find name 'HTMLElement'.
../node_modules/@types/jquery/index.d.ts(3362,12): error TS2304: Cannot find name 'HTMLElement'.
../node_modules/@types/jquery/index.d.ts(3375,35): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(3388,22): error TS2304: Cannot find name 'HTMLElement'.
../node_modules/@types/jquery/index.d.ts(3397,37): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(3404,22): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(3442,41): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(3456,22): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(3465,39): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(3500,43): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(3507,21): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(3529,19): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(3557,20): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(3572,39): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(3600,47): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(3633,25): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(3656,40): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(3663,19): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(3663,27): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(3709,28): error TS2304: Cannot find name 'Element'.
../node_modules/@types/jquery/index.d.ts(3750,25): error TS2304: Cannot find name 'Element'.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! functions@ build: `tsc`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the functions@ build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/YI/.npm/_logs/2018-09-19T07_21_25_454Z-debug.log

Error: functions predeploy error: Command terminated with non-zero exit code2
MacBook-Pro:functions YI$

*** Вопрос обновлен **** Я удалил папку node_module как в основной папке, так и в папке функций и затем запустил;

sudo npm install

, но даже npm install не работает должным образом.

    univ-MacBook-Pro:PRO YI$ sudo npm install

> node-sass@4.9.3 install /Users/YI/Desktop/PRO/node_modules/node-sass
> node scripts/install.js

Unable to save binary /Users/YI/Desktop/PRO/node_modules/node-sass/vendor/darwin-x64-57 : { Error: EACCES: permission denied, mkdir '/Users/YI/Desktop/PRO/node_modules/node-sass/vendor'
    at Object.fs.mkdirSync (fs.js:885:18)
    at sync (/Users/YI/Desktop/PRO/node_modules/mkdirp/index.js:71:13)
    at Function.sync (/Users/YI/Desktop/PRO/node_modules/mkdirp/index.js:77:24)
    at checkAndDownloadBinary (/Users/YI/Desktop/PRO/node_modules/node-sass/scripts/install.js:114:11)
    at Object.<anonymous> (/Users/YI/Desktop/PRO/node_modules/node-sass/scripts/install.js:157:1)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
  errno: -13,
  code: 'EACCES',
  syscall: 'mkdir',
  path: '/Users/YI/Desktop/PRO/node_modules/node-sass/vendor' }

> node-sass@4.9.3 postinstall /Users/YI/Desktop/PRO/node_modules/node-sass
> node scripts/build.js

Building: /usr/local/bin/node /Users/YI/Desktop/PRO/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ '/usr/local/bin/node',
gyp verb cli   '/Users/YI/Desktop/PRO/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library=' ]
gyp info using node-gyp@3.8.0
gyp info using node@8.12.0 | darwin | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed     at getNotFoundError (/Users/YI/Desktop/PRO/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/Users/YI/Desktop/PRO/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/Users/YI/Desktop/PRO/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /Users/YI/Desktop/PRO/node_modules/which/which.js:89:16
gyp verb `which` failed     at /Users/YI/Desktop/PRO/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /Users/YI/Desktop/PRO/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed  python2 { Error: not found: python2
gyp verb `which` failed     at getNotFoundError (/Users/YI/Desktop/PRO/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/Users/YI/Desktop/PRO/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/Users/YI/Desktop/PRO/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /Users/YI/Desktop/PRO/node_modules/which/which.js:89:16
gyp verb `which` failed     at /Users/YI/Desktop/PRO/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /Users/YI/Desktop/PRO/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed   stack: 'Error: not found: python2\n    at getNotFoundError (/Users/YI/Desktop/PRO/node_modules/which/which.js:13:12)\n    at F (/Users/YI/Desktop/PRO/node_modules/which/which.js:68:19)\n    at E (/Users/YI/Desktop/PRO/node_modules/which/which.js:80:29)\n    at /Users/YI/Desktop/PRO/node_modules/which/which.js:89:16\n    at /Users/YI/Desktop/PRO/node_modules/isexe/index.js:42:5\n    at /Users/YI/Desktop/PRO/node_modules/isexe/mode.js:8:5\n    at FSReqWrap.oncomplete (fs.js:152:21)',
gyp verb `which` failed   code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python /usr/bin/python
gyp verb check python version `/usr/bin/python -c "import sys; print "2.7.10
gyp verb check python version .%s.%s" % sys.version_info[:3];"` returned: %j
gyp verb get node dir no --target version specified, falling back to host node version: 8.12.0
gyp verb command install [ '8.12.0' ]
gyp verb install input version string "8.12.0"
gyp verb install installing version: 8.12.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 8.12.0
gyp verb build dir attempting to create "build" dir: /Users/YI/Desktop/PRO/node_modules/node-sass/build
gyp ERR! configure error 
gyp ERR! stack Error: EACCES: permission denied, mkdir '/Users/YI/Desktop/PRO/node_modules/node-sass/build'
gyp ERR! System Darwin 16.0.0
gyp ERR! command "/usr/local/bin/node" "/Users/YI/Desktop/PRO/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/YI/Desktop/PRO/node_modules/node-sass
gyp ERR! node -v v8.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
Build failed with error code: 1
npm WARN bootstrap@4.1.3 requires a peer of popper.js@^1.14.3 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: node-sass@4.9.3 (node_modules/node-sass):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: node-sass@4.9.3 postinstall: `node scripts/build.js`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

audited 24244 packages in 7.67s
found 12 vulnerabilities (9 low, 3 high)
  run `npm audit fix` to fix them, or `npm audit` for details

Заранее спасибо.

...