Build failing with vue-notification package - vue.js

I'm working on a project with vuepress and the vue-notification package. Everything is ok when I run the project locally with the vuepress dev command.
However, I get this error message when build the project:
> vuepress build docs
wait Extracting site metadata...
tip Apply theme #vuepress/theme-default ...
tip Apply plugin container (i.e. "vuepress-plugin-container") ...
tip Apply plugin #vuepress/register-components (i.e. "#vuepress/plugin-register-components") ...
tip Apply plugin #vuepress/active-header-links (i.e. "#vuepress/plugin-active-header-links") ...
tip Apply plugin #vuepress/search (i.e. "#vuepress/plugin-search") ...
tip Apply plugin #vuepress/nprogress (i.e. "#vuepress/plugin-nprogress") ...
✔ Client
Compiled successfully in 9.57s
✔ Server
Compiled successfully in 6.32s
wait Rendering static HTML...
error Error rendering /: false
undefined
error Error rendering /404.html: false
undefined
ReferenceError: document is not defined
at addStyle (node_modules/vue-notification/dist/index.js:1019:0)
at addStylesToDom (node_modules/vue-notification/dist/index.js:1003:0)
at module.exports (node_modules/vue-notification/dist/index.js:957:0)
at Object.<anonymous> (node_modules/vue-notification/dist/index.js:898:0)
at __webpack_require__ (node_modules/vue-notification/dist/index.js:30:0)
at Object.<anonymous> (node_modules/vue-notification/dist/index.js:204:0)
at __webpack_require__ (node_modules/vue-notification/dist/index.js:30:0)
at Object.<anonymous> (node_modules/vue-notification/dist/index.js:154:0)
at __webpack_require__ (node_modules/vue-notification/dist/index.js:30:0)
at server-bundle.js:6487:18
at server-bundle.js:6490:10
at webpackUniversalModuleDefinition (node_modules/vue-notification/dist/index.js:3:0)
at Object.<anonymous> (node_modules/vue-notification/dist/index.js:10:1)
at __webpack_require__ (webpack/bootstrap:25:0)
at Module.<anonymous> (server-bundle.js:13363:12)
at __webpack_require__ (webpack/bootstrap:25:0)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! test-vuepress-notification#1.0.0 build: `vuepress build docs`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the test-vuepress-notification#1.0.0 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! /home/joao/.npm/_logs/2021-04-13T13_35_49_588Z-debug.log
This is the content of the log file
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'build' ]
2 info using npm#6.14.12
3 info using node#v14.16.1
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle test-vuepress-notification#1.0.0~prebuild: test-vuepress-notification#1.0.0
6 info lifecycle test-vuepress-notification#1.0.0~build: test-vuepress-notification#1.0.0
7 verbose lifecycle test-vuepress-notification#1.0.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle test-vuepress-notification#1.0.0~build: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/joao/test-vuepress-notification/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
9 verbose lifecycle test-vuepress-notification#1.0.0~build: CWD: /home/joao/test-vuepress-notification
10 silly lifecycle test-vuepress-notification#1.0.0~build: Args: [ '-c', 'vuepress build docs' ]
11 silly lifecycle test-vuepress-notification#1.0.0~build: Returned: code: 1 signal: null
12 info lifecycle test-vuepress-notification#1.0.0~build: Failed to exec build script
13 verbose stack Error: test-vuepress-notification#1.0.0 build: `vuepress build docs`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:315:20)
13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:315:20)
13 verbose stack at maybeClose (internal/child_process.js:1048:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
14 verbose pkgid test-vuepress-notification#1.0.0
15 verbose cwd /home/joao/test-vuepress-notification
16 verbose Linux 4.19.0-16-amd64
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "build"
18 verbose node v14.16.1
19 verbose npm v6.14.12
20 error code ELIFECYCLE
21 error errno 1
22 error test-vuepress-notification#1.0.0 build: `vuepress build docs`
22 error Exit status 1
23 error Failed at the test-vuepress-notification#1.0.0 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
And this is the information on my environment
Environment Info:
System:
OS: Linux 5.4 Debian GNU/Linux 10 (buster) 10 (buster)
CPU: (4) x64 Intel(R) Core(TM) i5-7200U CPU # 2.50GHz
Binaries:
Node: 14.16.0 - /usr/bin/node
Yarn: Not Found
npm: 6.14.11 - /usr/bin/npm
Browsers:
Chrome: Not Found
Firefox: Not Found
npmPackages:
#vuepress/core: 1.8.2
#vuepress/theme-default: 1.8.2
vuepress: ^1.8.2 => 1.8.2
npmGlobalPackages:
vuepress: Not Found
The repository that I have used to reproduce the error is available in https://github.com/joaohis/vuepress-vue-notification-issue
Am I importing and injecting the vue-notification package correctly?
Do vuepress and vue-notification are not compatible?
Thank you.

With the help of a colleague in Reddit, I figured out that this is a problem with server-side rendering. To cope with it, I have followed the vue-notification documentation resulting in this enhanceApp.js file
import Notifications from 'vue-notification/dist/ssr.js'
export default ({
Vue, // the version of Vue being used in the VuePress app
options, // the options for the root Vue instance
router, // the router instance for the app
siteData, // site metadata
isServer // is this enhancement applied in server-rendering or client
}) => {
Vue.use(Notifications)
// Import the conventional module for client-side render
if (!isServer) {
import('vue-notification/dist/index.js').then(module => {
Vue.use(module)
})
}
}
Now I can build the project without any problem.

Related

turtle-cli: Error: 'expo-module-prepare' does not exist

Trying to build a dev version of an APK (Android) but I keep getting the following error.
14572 timing reify:rollback:createSparse Completed in 5948ms
14573 timing reify:rollback:retireShallow Completed in 14ms
14574 timing command:install Completed in 278406ms
14575 verbose stack Error: command failed
14575 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/#npmcli/promise-spawn/lib/index.js:63:27)
14575 verbose stack at ChildProcess.emit (node:events:527:28)
14575 verbose stack at maybeClose (node:internal/child_process:1092:16)
14575 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
14576 verbose pkgid #expo/html-elements#0.0.2
14577 verbose cwd /Users/faisaliqbal/.turtle/workingdir/android/sdk42
14578 verbose Darwin 21.3.0
14579 verbose node v16.15.1
14580 verbose npm v8.11.0
14581 error code 1
14582 error path /Users/faisaliqbal/.turtle/workingdir/android/sdk42/packages/html-elements
14583 error command failed
14584 error command sh -c expo-module prepare
14585 error /Users/faisaliqbal/.turtle/workingdir/android/sdk42/node_modules/commander/index.js:837
14585 error throw new Error(executableMissing);
14585 error ^
14585 error
14585 error Error: 'expo-module-prepare' does not exist
14585 error - if 'prepare' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
14585 error - if the default executable name is not suitable, use the executableFile option to supply a custom name
14585 error at ChildProcess.<anonymous> (/Users/faisaliqbal/.turtle/workingdir/android/sdk42/node_modules/commander/index.js:837:15)
14585 error at ChildProcess.emit (node:events:527:28)
14585 error at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12)
14585 error at onErrorNT (node:internal/child_process:478:16)
14585 error at processTicksAndRejections (node:internal/process/task_queues:83:21)
14586 verbose exit 1
14587 timing npm Completed in 278532ms
14588 verbose unfinished npm timer reify 1656882423113
Here are the versions of the app I am using.
Note: This project is working and compiling fine on another machine.
OS - darwin 12.2.1 (Monterey)
turtle - 0.27.4
Java (2) Versions:
java 18.0.1.1 2022-04-22
openjdk 11.0.15 2022-04-19
expo - 5.4.12
nodejs - v16.15.1
npm - 8.11.0
setup:android is all good
setup:ios is all good
IPA (IOS Binary) compiles without any issue.
Command to start the build:
turtle build:android \
--keystore-path ./keystore/keystore_android.jks \
--keystore-alias "store (redacted)" \
--allow-non-https-public-url \
--gradle-args "--warning-mode all" \
--public-url expo_url (redacted) \
-t apk
What might be the causing this?
Downgrading NodeJS version from 16 to 14 helped.
I originally installed NodeJS using official installer and after removing the installed version I reinstalled node using brew:
brew install node#14
(everything else I specified in my question was left untouched.

Vue create “projectName” ERR_SOCKET_TIMEOUT - fails all the time no matter what - taobao

I am getting a bit confused about what’s been happening to me recently.
Whenever I want to create a new vue project, it fails with:
Vue CLI v4.5.11
✨ Creating project in /home/admin/Documents/dev/my_projects/vThesaurus/thesaurus.
⚙️ Installing CLI plugins. This might take a while...
npm ERR! code ERR_SOCKET_TIMEOUT
npm ERR! errno ERR_SOCKET_TIMEOUT
npm ERR! request to https://registry.npm.taobao.org/jsonfile failed, reason: Socket timeout
npm ERR! A complete log of this run can be found in:
npm ERR! /home/admin/.npm/_logs/2021-03-17T06_40_10_793Z-debug.log
ERROR command failed: npm install --loglevel error --legacy-peer-deps
another packages from prev attempts:
request to https://registry.npm.taobao.org/core-js-compat failed, reason: Socket timeout
request to https://cdn.npm.taobao.org/micromatch/-/micromatch-4.0.2.tgz failed, reason: Socket timeout
request to https://registry.npm.taobao.org/querystring-es3 failed, reason: Socket timeout
request to https://registry.npm.taobao.org/file-loader failed, reason: Socket timeout
… and many more
Log: (last part)
4675 timing command:install Completed in 378261ms
4676 verbose type system
4677 verbose stack FetchError: request to https://registry.npm.taobao.org/jsonfile failed, reason: Socket timeout
4677 verbose stack at ClientRequest.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:97:14)
4677 verbose stack at ClientRequest.emit (events.js:315:20)
4677 verbose stack at TLSSocket.socketErrorListener (_http_client.js:463:9)
4677 verbose stack at TLSSocket.emit (events.js:327:22)
4677 verbose stack at emitErrorNT (internal/streams/destroy.js:100:8)
4677 verbose stack at emitErrorCloseNT (internal/streams/destroy.js:68:3)
4677 verbose stack at processTicksAndRejections (internal/process/task_queues.js:84:21)
4678 verbose cwd /home/admin/Documents/dev/my_projects/vThesaurus/thesaurus
4679 verbose Linux 5.4.0-67-generic
4680 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--loglevel" "error" "--legacy-peer-deps"
4681 verbose node v14.2.0
4682 verbose npm v7.6.3
4683 error code ERR_SOCKET_TIMEOUT
4684 error errno ERR_SOCKET_TIMEOUT
4685 error request to https://registry.npm.taobao.org/jsonfile failed, reason: Socket timeout
4686 verbose exit 1
the weirdest part is that it always fails on a different package …
I tried:
to remove nodejs and vue, reinstall again but no luck …
to increase timeout in the ~/.npmrc but no luck again … (I don’t have slow internet connection - ping 3ms, d: 96Mbps, u: 9.6Mbps)
nothing I found on the internet seems to be working …
changing IPs (nordvpn) to reach to diff servers (CDN) but no luck
vue2 and vue3 ends up with the same failure (random package failure all the time)
manually accessing the failed package - guess what, it works great
tried to add { "useTaobaoRegistry": false } in the ~/.vimrc … no luck again
tried different network provider... no luck :(
nothing seems to be working …
npm -v
7.6.3
vue --version
#vue/cli 4.5.11
OS: Ubuntu 20.04.2 LTS 64bit
Gnome version: 3.36.8
what am I missing?
Looks like you do have issues with taobao in particular. From this github thread, we may try to not use it anymore.
For that, you can go to your ~/.vuerc and set "useTaobaoRegistry": false.
yarn config get registry is giving me https://registry.yarnpkg.com.

Azure devops error : This is probably not a problem with npm. There is likely additional logging output above

I am getting the following error in Azure DevOps build the pipeline. This works perfectly fine in the local environment.
The error is thrown in ng e2e step. I am on Angular 7.1 version.
2018-12-23T11:09:23.7978210Z ##[section]Starting: Run e2e
2018-12-23T11:09:23.7982921Z ==============================================================================
2018-12-23T11:09:23.7983079Z Task : npm
2018-12-23T11:09:23.7983172Z Description : Install and publish npm packages, or run an npm command. Supports npmjs.com and authenticated registries like Package Management.
2018-12-23T11:09:23.7983263Z Version : 1.144.0
2018-12-23T11:09:23.7983316Z Author : Microsoft Corporation
2018-12-23T11:09:23.7983401Z Help : [More Information](https://go.microsoft.com/fwlink/?LinkID=613746)
2018-12-23T11:09:23.7983480Z ==============================================================================
2018-12-23T11:09:24.2946060Z SYSTEMVSSCONNECTION exists true
2018-12-23T11:09:24.3883866Z SYSTEMVSSCONNECTION exists true
2018-12-23T11:09:24.6106087Z [command]C:\Windows\system32\cmd.exe /D /S /C ""C:\Program Files\nodejs\npm.cmd" --version"
2018-12-23T11:09:25.3644361Z 6.4.1
2018-12-23T11:09:27.0143140Z [command]C:\Windows\system32\cmd.exe /D /S /C ""C:\Program Files\nodejs\npm.cmd" config list"
2018-12-23T11:09:27.8299297Z ; cli configs
2018-12-23T11:09:27.8299516Z metrics-registry = "https://registry.npmjs.org/"
2018-12-23T11:09:27.8299587Z scope = ""
2018-12-23T11:09:27.8299667Z user-agent = "npm/6.4.1 node/v8.12.0 win32 x64"
2018-12-23T11:09:27.8299713Z
2018-12-23T11:09:27.8299768Z ; environment configs
2018-12-23T11:09:27.8299845Z cache = "C:\\npm\\cache"
2018-12-23T11:09:27.8299903Z prefix = "C:\\npm\\prefix"
2018-12-23T11:09:27.8299985Z userconfig = "D:\\a\\1\\npm\\19427.npmrc"
2018-12-23T11:09:27.8300028Z
2018-12-23T11:09:27.8300099Z ; builtin config undefined
2018-12-23T11:09:27.8300137Z
2018-12-23T11:09:27.8300196Z ; node bin location = C:\Program Files\nodejs\node.exe
2018-12-23T11:09:27.8300282Z ; cwd = D:\a\1\s\client
2018-12-23T11:09:27.8300340Z ; HOME = C:\Users\VssAdministrator
2018-12-23T11:09:27.8300451Z ; "npm config ls -l" to show all defaults.
2018-12-23T11:09:27.8300495Z
2018-12-23T11:09:27.8300930Z [command]C:\Windows\system32\cmd.exe /D /S /C ""C:\Program Files\nodejs\npm.cmd" run e2e:ci"
2018-12-23T11:09:30.8886103Z events.js:183
2018-12-23T11:09:30.8886306Z throw er; // Unhandled 'error' event
2018-12-23T11:09:30.8929743Z ^
2018-12-23T11:09:30.8929831Z
2018-12-23T11:09:30.8929890Z Error: read ECONNRESET
2018-12-23T11:09:30.8929964Z at TLSWrap.onread (net.js:622:25)
2018-12-23T11:09:30.8930031Z npm ERR! code ELIFECYCLE
2018-12-23T11:09:30.8930094Z npm ERR! errno 1
2018-12-23T11:09:30.8930157Z npm ERR! icepp#0.0.1 e2e:ci: `ng e2e --configuration=ci`
2018-12-23T11:09:30.8930238Z npm ERR! Exit status 1
2018-12-23T11:09:30.8930294Z npm ERR!
2018-12-23T11:09:30.8930362Z npm ERR! Failed at the icepp#0.0.1 e2e:ci script.
2018-12-23T11:09:30.8930448Z npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2018-12-23T11:09:30.8930548Z
2018-12-23T11:09:30.8930611Z npm ERR! A complete log of this run can be found in:
2018-12-23T11:09:30.8930709Z npm ERR! C:\npm\cache\_logs\2018-12-23T11_09_30_852Z-debug.log
2018-12-23T11:09:30.8930759Z
2018-12-23T11:09:30.8930816Z > icepp#0.0.1 e2e:ci D:\a\1\s\client
2018-12-23T11:09:30.8930888Z > ng e2e --configuration=ci
2018-12-23T11:09:30.8930927Z
2018-12-23T11:09:30.8931013Z [11:09:30] I/file_manager - creating folder D:\a\1\s\client\node_modules\protractor\node_modules\webdriver-manager\selenium
2018-12-23T11:09:30.8931178Z [11:09:30] I/config_source - curl -oD:\a\1\s\client\node_modules\protractor\node_modules\webdriver-manager\selenium\chrome-response.xml https://chromedriver.storage.googleapis.com/
2018-12-23T11:09:30.9440180Z Found npm debug log, make sure the path matches with the one in npm's output: C:\npm\cache\_logs\2018-12-23T11_09_30_852Z-debug.log
2018-12-23T11:09:30.9440341Z 0 info it worked if it ends with ok
2018-12-23T11:09:30.9440416Z 1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
2018-12-23T11:09:30.9440540Z 1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
2018-12-23T11:09:30.9442090Z 1 verbose cli 'run',
2018-12-23T11:09:30.9442167Z 1 verbose cli 'e2e:ci' ]
2018-12-23T11:09:30.9442227Z 2 info using npm#6.4.1
2018-12-23T11:09:30.9442298Z 3 info using node#v8.12.0
2018-12-23T11:09:30.9442532Z 4 verbose run-script [ 'pree2e:ci', 'e2e:ci', 'poste2e:ci' ]
2018-12-23T11:09:30.9442602Z 5 info lifecycle icepp#0.0.1~pree2e:ci: icepp#0.0.1
2018-12-23T11:09:30.9442681Z 6 info lifecycle icepp#0.0.1~e2e:ci: icepp#0.0.1
2018-12-23T11:09:30.9442752Z 7 verbose lifecycle icepp#0.0.1~e2e:ci: unsafe-perm in lifecycle true
2018-12-23T11:09:30.9443270Z 8 verbose lifecycle icepp#0.0.1~e2e:ci: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\a\1\s\client\node_modules\.bin;C:\agents\2.144.0\externals\git\cmd;C:\tools\mingw64\bin;C:\Program Files\dotnet;C:\mysql-5.7.21-winx64\bin;C:\Program Files\Java\jdk1.8.0_192\bin;C:\npm\prefix;C:\hostedtoolcache\windows\Ruby\2.5.0\x64\bin;C:\Go1.11\bin;C:\Program Files\Git\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\Scripts;C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64;C:\Program Files\Microsoft MPI\Bin\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ProgramData\Chocolatey\bin;C:\Program Files\Docker;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code;C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager;C:\Program Files\Git\cmd;C:\Program Files (x86)\Subversion\bin;C:\Program Files\nodejs\;C:\Program Files\CMake\bin;C:\Program Files\Mercurial;C:\Users\VssAdministrator\AppData\Local\Microsoft\WindowsApps
2018-12-23T11:09:30.9444142Z 9 verbose lifecycle icepp#0.0.1~e2e:ci: CWD: D:\a\1\s\client
2018-12-23T11:09:30.9444233Z 10 silly lifecycle icepp#0.0.1~e2e:ci: Args: [ '/d /s /c', 'ng e2e --configuration=ci' ]
2018-12-23T11:09:30.9444330Z 11 silly lifecycle icepp#0.0.1~e2e:ci: Returned: code: 1 signal: null
2018-12-23T11:09:30.9444416Z 12 info lifecycle icepp#0.0.1~e2e:ci: Failed to exec e2e:ci script
2018-12-23T11:09:30.9444491Z 13 verbose stack Error: icepp#0.0.1 e2e:ci: `ng e2e --configuration=ci`
2018-12-23T11:09:30.9444567Z 13 verbose stack Exit status 1
2018-12-23T11:09:30.9444648Z 13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
2018-12-23T11:09:30.9444737Z 13 verbose stack at emitTwo (events.js:126:13)
2018-12-23T11:09:30.9444816Z 13 verbose stack at EventEmitter.emit (events.js:214:7)
2018-12-23T11:09:30.9444920Z 13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
2018-12-23T11:09:30.9444998Z 13 verbose stack at emitTwo (events.js:126:13)
2018-12-23T11:09:30.9445080Z 13 verbose stack at ChildProcess.emit (events.js:214:7)
2018-12-23T11:09:30.9445153Z 13 verbose stack at maybeClose (internal/child_process.js:915:16)
2018-12-23T11:09:30.9445248Z 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
2018-12-23T11:09:30.9445316Z 14 verbose pkgid icepp#0.0.1
2018-12-23T11:09:30.9445388Z 15 verbose cwd D:\a\1\s\client
2018-12-23T11:09:30.9445445Z 16 verbose Windows_NT 10.0.14393
2018-12-23T11:09:30.9445539Z 17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "e2e:ci"
2018-12-23T11:09:30.9445621Z 18 verbose node v8.12.0
2018-12-23T11:09:30.9445685Z 19 verbose npm v6.4.1
2018-12-23T11:09:30.9446141Z 20 error code ELIFECYCLE
2018-12-23T11:09:30.9446212Z 21 error errno 1
2018-12-23T11:09:30.9446271Z 22 error icepp#0.0.1 e2e:ci: `ng e2e --configuration=ci`
2018-12-23T11:09:30.9446347Z 22 error Exit status 1
2018-12-23T11:09:30.9446404Z 23 error Failed at the icepp#0.0.1 e2e:ci script.
2018-12-23T11:09:30.9446483Z 23 error This is probably not a problem with npm. There is likely additional logging output above.
2018-12-23T11:09:30.9446568Z 24 verbose exit [ 1, true ]
2018-12-23T11:09:30.9446605Z
2018-12-23T11:09:30.9511523Z ##[error]Error: Npm failed with return code: 1
2018-12-23T11:09:30.9523513Z ##[section]Finishing: Run e2e
I am using Hosted VS2017 agent. I don't think I am missing any module because it works perfectly fine on local environment.
Build Pipeline

Unable to install NPM packages due to path length constraint using NPM 5.X

I'm running Windows 10, NPM v5.5.1, and node v8.9.1.
Edit: I have since updated to node v8.9.4 and npm v5.6.0. The problem remains unchanged.
I set up my development environment on this machine about 2 months ago. I'm using Angular CLI to build my client apps.
Everything was going fine. I added a few packages via NPM without a problem, such as Gulp and ngx-bootstrap. Then I started to run into errors on some of my package installs.
The errors are:
npm ERR! code PATH_LENGTH_EXCEEDED
npm ERR! errno PATH_LENGTH_EXCEEDED
npm ERR! request to https://registry/npmjs.org/{{package}} failed, reason: path length constraint exceeded
npm ERR! A complete log of this run can be found in:
npm ERR! {{npm_cache path}}\_logs\2018-02-08T14_43_40_856Z-debug.log
The contents of that log file are:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'install',
1 verbose cli 'ngx-cookie-service',
1 verbose cli '--save' ]
2 info using npm#5.5.1
3 info using node#v8.9.1
4 verbose npm-session d55be12849534a0a
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 silly fetchPackageMetaData error for ngx-cookie-service#latest request to https://registry.npmjs.org/ngx-cookie-service failed, reason: path length constraint exceeded
8 verbose type system
9 verbose stack FetchError: request to https://registry.npmjs.org/ngx-cookie-service failed, reason: path length constraint exceeded
9 verbose stack at ClientRequest.req.on.err (C:\Program Files\nodejs\node_modules\npm\node_modules\pacote\node_modules\make-fetch-happen\node_modules\node-fetch-npm\src\index.js:68:14)
9 verbose stack at emitOne (events.js:116:13)
9 verbose stack at ClientRequest.emit (events.js:211:7)
9 verbose stack at TLSSocket.socketErrorListener (_http_client.js:387:9)
9 verbose stack at emitOne (events.js:116:13)
9 verbose stack at TLSSocket.emit (events.js:211:7)
9 verbose stack at emitErrorNT (internal/streams/destroy.js:64:8)
9 verbose stack at _combinedTickCallback (internal/process/next_tick.js:138:11)
9 verbose stack at process._tickCallback (internal/process/next_tick.js:180:9)
10 verbose cwd C:\Development\test
11 verbose Windows_NT 10.0.15063
12 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "ngx-cookie-service" "--save"
13 verbose node v8.9.1
14 verbose npm v5.5.1
15 error code PATH_LENGTH_EXCEEDED
16 error errno PATH_LENGTH_EXCEEDED
17 error request to https://registry.npmjs.org/ngx-cookie-service failed, reason: path length constraint exceeded
18 verbose exit [ 1, true ]
I researched this, and found the Windows 10 file path 260 character limitation. I thought that npm version 3.1.0 should have fixed this issue, but I decided to followed the instructions in this answer, because I'm still running into this issue despite using NPM v5.5.1.
I found that my version of Windows was prior to the roll out of the feature that lets you disable this limitation. I updated to Version 1703 (OS Build 15063.483), and to enable Win32 long paths.
Yet I'm still getting the error, and unable to install a variety of npm packages.
In testing to see if it was an issue with packages that have a lot of dependencies, I tried installing or reinstalling a couple of other packages.
Some fail with the errors above. Others succeed with the following warnings:
npm WARN Unexepcted warming for https://registry.npmjs.org/: Miscellaneous Warning PATH_LENGTH_EXCEEDED: request to https://registry.npmjs.org/{{package name}} failed, reason: path length constraint exceeded
npm WARN Using stale package data from https://registry.npmjs.org/ due to a request error during validation
Packages throwing the error include:
jslint
ngx-cookie-service
chart.js
angular-cli
Packages that throw the warnings include:
font-awesome
#angular/cli
moment
ngx-bootstrap
bootstrap
jasmine
I suspect that something has changed, either in a policy on my workstation, or in our network security, that is causing this. All of the packages that succeed seem to be packages that I had previously installed, either as a direct install, or as a dependency of #angular/cli (one of the first packages I installed). I'm assuming that the stale package data warning indicates that whatever problem I have with the path length is preventing updated data being retrieved, and therefore npm is falling back to cached data from previous installations of the selected package and its dependencies.
So now I'm stumped as to how to diagnose exactly where the issue is happening. If its a security policy that changed, then I need to be able to describe exactly what is being blocked so that I can work with our security department to fix this. But the only information I can find about the PATH_LENGTH_EXCEEDED errors lead me to old information about versions of npm prior to 3.1.0.
How can I identify the source of this problem?
After additional searching, I found references to path length exceeded with regards to SSL/TLS certificate authorities. I tested this issue by changing the npm registry to use http instead of https (note: this is a temporary step only; I have turned https back on once I verified the issue):
npm config set registry http://registry.npmjs.org/
This allowed me to install the problematic packages.
It seems the underlying cause is SSL Inspection performed by our network security team. The decryption, inspection, and re-encryption process, and subsequent changes in the Issuing Authority on the certificate, apparently triggers this error.

npm install error Invalid Package: expected taffydb but found taffydb-jsdoc

Running npm install and failed with error the following is from npm-debug.log file The same commands works yesterday. There's no change in package.json file.
15065 info install gulp-jsdoc#0.1.5
15066 info postinstall gulp-jsdoc#0.1.5
15067 verbose unlock done using /home/centos/.npm/_locks/gulp-jsdoc-a48e57f10f1c6755.lock for /data/jenkins/workspace/node_modules/gulp-jsdoc
15068 verbose stack Error: Invalid Package: expected taffydb but found taffydb-jsdoc
15068 verbose stack at /usr/lib/node_modules/npm/lib/cache/add-local-tarball.js:127:21
15068 verbose stack at /usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:356:5
15068 verbose stack at checkBinReferences_ (/usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:320:45)
15068 verbose stack at final (/usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:354:3)
15068 verbose stack at then (/usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:124:5)
15068 verbose stack at /usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:243:12
15068 verbose stack at /usr/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:78:16
15068 verbose stack at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:380:3)
15069 verbose cwd /data/jenkins/workspace/
15070 error Linux 3.10.0-327.18.2.el7.x86_64
15071 error argv "/usr/bin/node" "/usr/bin/npm" "install"
15072 error node v4.4.5
15073 error npm v2.15.5
15074 error Invalid Package: expected taffydb but found taffydb-jsdoc
15075 error If you need help, you may report this error at:
15075 error <https://github.com/npm/npm/issues>
15076 verbose exit [ 1, true ]
15077 verbose unbuild node_modules/jsdoc
15078 info preuninstall jsdoc#3.3.0-alpha5
15079 info uninstall jsdoc#3.3.0-alpha5
Thanks
G.S.
It would appear that this latest commit in the taffydb-jsdoc fork has broken it:
https://github.com/hegemonic/taffydb/commit/507d2d75fa16e1386f6d50abee1894b264d4458b
(https://www.npmjs.com/package/taffydb-jsdoc)
(Description updated)
The package has been renamed from taffydb to taffydb-jsdoc, so npm is finding a conflict between the expected and the declared package names. In our case and the OP's, hegemonic's fork of taffydb is being referenced by jsdoc, which is a node module required by gulp-jsdoc:
https://github.com/jsBoot/gulp-jsdoc/blob/v0.1.4/package.json#L39
https://github.com/jsdoc3/jsdoc/blob/v3.3.0-alpha5/package.json#L26
EDIT: The author of this fork has contacted me to say the issue has been resolved, as shown in this new commit (package name reverted):
https://github.com/hegemonic/taffydb/commit/e41b5e179e197bb85c5fb887b707672b1e5ca079
I can confirm that our npm install(s) are now working again.