i have a problem with vs code jupyter kernel which is "Failed to start the Kernel.
Kernel myenv (Python 3.10.6) is not usable. Check the Jupyter output tab for more information.
View Jupyter log for further details."
and here is the log file
info 11:18:50.709: Starting Jupyter Session startUsingPythonInterpreter, .jvsc74a57bd040addd079262761b1b840a83485a994a53c13135457a868359c8a32f257df68a./home/gouda/myenv/bin/python3./home/gouda/myenv/bin/python3.-m#ipykernel_launcher (Python Path: /home/gouda/myenv, EnvType: Venv, EnvName: 'myenv', Version: 3.10.6) for '/home/gouda/x.ipynb' (disableUI=false)
[I 11:18:50.726 NotebookApp] Creating new notebook in
info 11:18:50.745: installMissingDependencies /home/gouda/myenv/bin/python3, ui.disabled=false for resource '/home/gouda/x.ipynb'
info 11:18:50.746: Got env vars with python /home/gouda/myenv/bin/python3, with env var count 97 and custom env var count 0 in 1ms
info 11:18:50.746: Got env vars ourselves faster /home/gouda/myenv/bin/python3 with env var count 97 in 1ms
info 11:18:50.754: Process Execution: > ~/myenv/bin/python3 -c "import ipykernel"
> ~/myenv/bin/python3 -c "import ipykernel"
error 11:18:50.878: Failed to change kernel [SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at k.updateKernelEnvironment (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:1976545)
at async k.ensureKernelIsUsable (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:1974541)
at async k.createSession (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2080032)
at async k.createNewKernelSession (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2077500)
at async k.connect (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2076271)
at async u.startNew (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2084916)
at async s (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2014143)
at async _.createNotebookInstance (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2014306)
at async _.createNotebook (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2015245)
at async t.Kernel.createJupyterSession (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2100804)
at async t.Kernel.start (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2095530)
at async D.wrapKernelMethodImpl (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2349214)]
warn 11:18:50.881: Error occurred while trying to start the kernel, options.disableUI=false [a [Error]: Kernel myenv (Python 3.10.6) is not usable. Check the Jupyter output tab for more information.
at k.createNewKernelSession (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2077784)
at async k.connect (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2076271)
at async u.startNew (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2084916)
at async s (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2014143)
at async _.createNotebookInstance (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2014306)
at async _.createNotebook (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2015245)
at async t.Kernel.createJupyterSession (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2100804)
at async t.Kernel.start (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2095530)
at async D.wrapKernelMethodImpl (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2349214)] {
category: 'invalidkernel',
kernelConnectionMetadata: {
kind: 'startUsingPythonInterpreter',
kernelSpec: {
specFile: '/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/temp/jupyter/kernels/python3106jvsc74a57bd040addd079262761b1b840a83485a994a53c13135457a868359c8a32f257df68a/kernel.json',
interpreterPath: '/home/gouda/myenv/bin/python3',
isRegisteredByVSC: 'registeredByNewVersionOfExt',
name: 'python3106jvsc74a57bd040addd079262761b1b840a83485a994a53c13135457a868359c8a32f257df68a',
argv: [Array],
language: 'python',
executable: 'python',
display_name: "Python 3.10.6 ('myenv')",
metadata: [Object],
env: {}
},
interpreter: {
id: '/home/gouda/myenv/bin/python3',
sysPrefix: '/home/gouda/myenv',
envType: 'Venv',
envName: 'myenv',
envPath: [h],
architecture: 3,
sysVersion: '3.10.6 (main, Nov 2 2022, 18:53:38) [GCC 11.3.0]',
version: [Object],
displayName: "Python 3.10.6 ('myenv')",
detailedDisplayName: "Python 3.10.6 ('myenv': venv)",
uri: [h]
},
id: '.jvsc74a57bd040addd079262761b1b840a83485a994a53c13135457a868359c8a32f257df68a./home/gouda/myenv/bin/python3./home/gouda/myenv/bin/python3.-m#ipykernel_launcher'
}
}
warn 11:18:50.881: Kernel Error, context = start [a [Error]: Kernel myenv (Python 3.10.6) is not usable. Check the Jupyter output tab for more information.
at k.createNewKernelSession (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2077784)
at async k.connect (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2076271)
at async u.startNew (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2084916)
at async s (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2014143)
at async _.createNotebookInstance (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2014306)
at async _.createNotebook (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2015245)
at async t.Kernel.createJupyterSession (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2100804)
at async t.Kernel.start (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2095530)
at async D.wrapKernelMethodImpl (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2349214)] {
category: 'invalidkernel',
kernelConnectionMetadata: {
kind: 'startUsingPythonInterpreter',
kernelSpec: {
specFile: '/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/temp/jupyter/kernels/python3106jvsc74a57bd040addd079262761b1b840a83485a994a53c13135457a868359c8a32f257df68a/kernel.json',
interpreterPath: '/home/gouda/myenv/bin/python3',
isRegisteredByVSC: 'registeredByNewVersionOfExt',
name: 'python3106jvsc74a57bd040addd079262761b1b840a83485a994a53c13135457a868359c8a32f257df68a',
argv: [Array],
language: 'python',
executable: 'python',
display_name: "Python 3.10.6 ('myenv')",
metadata: [Object],
env: {}
},
interpreter: {
id: '/home/gouda/myenv/bin/python3',
sysPrefix: '/home/gouda/myenv',
envType: 'Venv',
envName: 'myenv',
envPath: [h],
architecture: 3,
sysVersion: '3.10.6 (main, Nov 2 2022, 18:53:38) [GCC 11.3.0]',
version: [Object],
displayName: "Python 3.10.6 ('myenv')",
detailedDisplayName: "Python 3.10.6 ('myenv': venv)",
uri: [h]
},
id: '.jvsc74a57bd040addd079262761b1b840a83485a994a53c13135457a868359c8a32f257df68a./home/gouda/myenv/bin/python3./home/gouda/myenv/bin/python3.-m#ipykernel_launcher'
}
}
info 11:18:50.882: Got env vars with python /home/gouda/myenv/bin/python3, with env var count 97 and custom env var count 0 in 1ms
info 11:18:50.882: Got env vars ourselves faster /home/gouda/myenv/bin/python3 with env var count 97 in 1ms
info 11:18:50.887: Process Execution: > ~/myenv/bin/python3 -c "import ipykernel"
> ~/myenv/bin/python3 -c "import ipykernel"
[W 11:18:50.888 NotebookApp] delete /x-jvsc-f62a5d52-5b3b-4dab-9191-d8bfbfc13aef698d48c7-5c43-4cd4-869d-35e004105e73.ipynb
info 11:18:51.000: Dispose Kernel '/home/gouda/x.ipynb' associated with '/home/gouda/x.ipynb'
error 11:18:51.002: Error in execution [a [Error]: Kernel myenv (Python 3.10.6) is not usable. Check the Jupyter output tab for more information.
at k.createNewKernelSession (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2077784)
at async k.connect (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2076271)
at async u.startNew (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2084916)
at async s (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2014143)
at async _.createNotebookInstance (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2014306)
at async _.createNotebook (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2015245)
at async t.Kernel.createJupyterSession (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2100804)
at async t.Kernel.start (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2095530)
at async D.wrapKernelMethodImpl (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2349214)] {
category: 'invalidkernel',
kernelConnectionMetadata: {
kind: 'startUsingPythonInterpreter',
kernelSpec: {
specFile: '/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/temp/jupyter/kernels/python3106jvsc74a57bd040addd079262761b1b840a83485a994a53c13135457a868359c8a32f257df68a/kernel.json',
interpreterPath: '/home/gouda/myenv/bin/python3',
isRegisteredByVSC: 'registeredByNewVersionOfExt',
name: 'python3106jvsc74a57bd040addd079262761b1b840a83485a994a53c13135457a868359c8a32f257df68a',
argv: [Array],
language: 'python',
executable: 'python',
display_name: "Python 3.10.6 ('myenv')",
metadata: [Object],
env: {}
},
interpreter: {
id: '/home/gouda/myenv/bin/python3',
sysPrefix: '/home/gouda/myenv',
envType: 'Venv',
envName: 'myenv',
envPath: [h],
architecture: 3,
sysVersion: '3.10.6 (main, Nov 2 2022, 18:53:38) [GCC 11.3.0]',
version: [Object],
displayName: "Python 3.10.6 ('myenv')",
detailedDisplayName: "Python 3.10.6 ('myenv': venv)",
uri: [h]
},
id: '.jvsc74a57bd040addd079262761b1b840a83485a994a53c13135457a868359c8a32f257df68a./home/gouda/myenv/bin/python3./home/gouda/myenv/bin/python3.-m#ipykernel_launcher'
}
}
error 11:18:51.002: Error in execution (get message for cell) [a [Error]: Kernel myenv (Python 3.10.6) is not usable. Check the Jupyter output tab for more information.
at k.createNewKernelSession (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2077784)
at async k.connect (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2076271)
at async u.startNew (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2084916)
at async s (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2014143)
at async _.createNotebookInstance (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2014306)
at async _.createNotebook (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2015245)
at async t.Kernel.createJupyterSession (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2100804)
at async t.Kernel.start (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2095530)
at async D.wrapKernelMethodImpl (/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2349214)] {
category: 'invalidkernel',
kernelConnectionMetadata: {
kind: 'startUsingPythonInterpreter',
kernelSpec: {
specFile: '/home/gouda/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/temp/jupyter/kernels/python3106jvsc74a57bd040addd079262761b1b840a83485a994a53c13135457a868359c8a32f257df68a/kernel.json',
interpreterPath: '/home/gouda/myenv/bin/python3',
isRegisteredByVSC: 'registeredByNewVersionOfExt',
name: 'python3106jvsc74a57bd040addd079262761b1b840a83485a994a53c13135457a868359c8a32f257df68a',
argv: [Array],
language: 'python',
executable: 'python',
display_name: "Python 3.10.6 ('myenv')",
metadata: [Object],
env: {}
},
interpreter: {
id: '/home/gouda/myenv/bin/python3',
sysPrefix: '/home/gouda/myenv',
envType: 'Venv',
envName: 'myenv',
envPath: [h],
architecture: 3,
sysVersion: '3.10.6 (main, Nov 2 2022, 18:53:38) [GCC 11.3.0]',
version: [Object],
displayName: "Python 3.10.6 ('myenv')",
detailedDisplayName: "Python 3.10.6 ('myenv': venv)",
uri: [h]
},
id: '.jvsc74a57bd040addd079262761b1b840a83485a994a53c13135457a868359c8a32f257df68a./home/gouda/myenv/bin/python3./home/gouda/myenv/bin/python3.-m#ipykernel_launcher'
}
}
when i try to run a cell , this error appears to me , what should i do ?
Related
my objective:
is to successfully publish my coverage report in a pipeline on azure devops.
To send it to SonarCloud
my successes
locally on my pc
I manage to generate the coverage report in html format and also in xml
1. script task on my pipeline:
- script: |
npx ng test --code-coverage --karma-config src/karma-ci.conf.js
condition: succeededOrFailed()
displayName: Generate unit tests report
2. kama-ci.config.js file:
module.exports = function (config) {
config.set({
frameworks: ['jasmine', '#angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-junit-reporter'),
require('karma-coverage'),
require('karma-coverage-istanbul-reporter'),
require('#angular-devkit/build-angular/plugins/karma')
],
junitReporter: {
outputDir: 'TestResults/junit',
outputFile: 'unittest-results.xml',
useBrowserName: false
},
coverageReporter: {
type : 'cobertura',
dir : 'TestResults',
subdir: 'coverage',
file: 'code-coverage.xml'
},
reporters: ['progress', 'junit', 'coverage'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: false,
customLaunchers: {
ChromeHeadless: {
base: 'Chrome',
flags: [
'--headless',
'--disable-gpu',
'--no-sandbox',
'--remote-debugging-port=9222',
]
}
},
browsers: ['ChromeHeadless'],
singleRun: true
});
};
3. Result error:
But the problem is, report generation always starts and fails in the pipeline.
Here is his result, despite the fact that I give it the condition of always succeeding.
2021-06-02T14:50:42.8314347Z ##[section]Starting: Generate unit tests
2021-06-02T14:50:42.8319061Z ==============================================================================
2021-06-02T14:50:42.8319314Z Task : Command line
2021-06-02T14:50:42.8319582Z Description : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows
2021-06-02T14:50:42.8319857Z Version : 2.182.0
2021-06-02T14:50:42.8320038Z Author : Microsoft Corporation
2021-06-02T14:50:42.8320318Z Help : https://learn.microsoft.com/azure/devops/pipelines/tasks/utility/command-line
2021-06-02T14:50:42.8320658Z ==============================================================================
2021-06-02T14:50:42.9528480Z Generating script.
2021-06-02T14:50:42.9529859Z Script contents:
2021-06-02T14:50:42.9530447Z npx ng test --code-coverage --karma-config src/karma-ci.conf.js
2021-06-02T14:50:42.9530922Z ========================== Starting Command Output ===========================
2021-06-02T14:50:42.9558445Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/7177135e-e9ad-4ecf-b6f1-86193e021ca3.sh
2021-06-02T14:51:01.5747869Z [32m02 06 2021 14:51:01.570:INFO [karma-server]: [39mKarma v3.1.4 server started at http://0.0.0.0:9876/
2021-06-02T14:51:01.5749272Z [32m02 06 2021 14:51:01.573:INFO [launcher]: [39mLaunching browsers ChromeHeadless with concurrency unlimited
2021-06-02T14:51:01.5774208Z [32m02 06 2021 14:51:01.577:INFO [launcher]: [39mStarting browser Chrome
2021-06-02T14:51:03.4612458Z
2021-06-02T14:51:03.4614556Z ERROR in [96mapp/services/dealflow-secondary.service.ts[0m:[93m4[0m:[93m37[0m - [91merror[0m[90m TS2307: [0mCannot find module '../entities/ISecondaryPortfolio'.
2021-06-02T14:51:03.4615270Z
2021-06-02T14:51:03.4616058Z [7m4[0m import { ISecondaryPortfolio } from '../entities/ISecondaryPortfolio';
2021-06-02T14:51:03.4616981Z [7m [0m [91m ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[0m
2021-06-02T14:51:03.4618161Z [96mapp/shared/api/geography.api.ts[0m:[93m8[0m:[93m27[0m - [91merror[0m[90m TS2307: [0mCannot find module 'src/app/ui/funds/fund-list/models/Geography'.
2021-06-02T14:51:03.4618794Z
2021-06-02T14:51:03.4619553Z [7m8[0m import { Geography } from 'src/app/ui/funds/fund-list/models/Geography';
2021-06-02T14:51:03.4620454Z [7m [0m [91m ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[0m
2021-06-02T14:51:03.4621635Z [96mapp/shared/services/geography.service.ts[0m:[93m2[0m:[93m27[0m - [91merror[0m[90m TS2307: [0mCannot find module 'src/app/ui/funds/fund-list/models/Geography'.
2021-06-02T14:51:03.4622232Z
2021-06-02T14:51:03.4622986Z [7m2[0m import { Geography } from 'src/app/ui/funds/fund-list/models/Geography';
2021-06-02T14:51:03.4623886Z [7m [0m [91m ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[0m
2021-06-02T14:51:03.4625110Z [96mapp/ui/dealflow/add-fund-portfolio/add-fund-portfolio.component.ts[0m:[93m7[0m:[93m37[0m - [91merror[0m[90m TS2307: [0mCannot find module 'src/app/entities/ISecondaryPortfolio'.
2021-06-02T14:51:03.4625760Z
2021-06-02T14:51:03.4626506Z [7m7[0m import { ISecondaryPortfolio } from 'src/app/entities/ISecondaryPortfolio';
2021-06-02T14:51:03.4627440Z [7m [0m [91m ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[0m
2021-06-02T14:51:03.4628643Z [96mapp/ui/dealflow/dealflow.service.ts[0m:[93m13[0m:[93m37[0m - [91merror[0m[90m TS2307: [0mCannot find module '../../entities/ISecondaryPortfolio'.
2021-06-02T14:51:03.4629250Z
2021-06-02T14:51:03.4629996Z [7m13[0m import { ISecondaryPortfolio } from '../../entities/ISecondaryPortfolio';
2021-06-02T14:51:03.4630925Z [7m [0m [91m ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[0m
2021-06-02T14:51:03.4632053Z [96mapp/ui/dealflow/models/DealFlow.ts[0m:[93m1[0m:[93m37[0m - [91merror[0m[90m TS2307: [0mCannot find module 'src/app/entities/ISecondaryPortfolio'.
2021-06-02T14:51:03.4632630Z
2021-06-02T14:51:03.4633391Z [7m1[0m import { ISecondaryPortfolio } from "src/app/entities/ISecondaryPortfolio";
2021-06-02T14:51:03.4634782Z [7m [0m [91m ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[0m
2021-06-02T14:51:03.4636019Z [96mapp/ui/dealflow/project-secondary/project-secondary.component.ts[0m:[93m15[0m:[93m37[0m - [91merror[0m[90m TS2307: [0mCannot find module '../../../entities/ISecondaryPortfolio'.
2021-06-02T14:51:03.4638214Z
2021-06-02T14:51:03.4640037Z [7m15[0m import { ISecondaryPortfolio } from '../../../entities/ISecondaryPortfolio';
2021-06-02T14:51:03.4641024Z [7m [0m [91m ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[0m
2021-06-02T14:51:03.4642193Z [96mapp/ui/dealflow/send-to-mdm-popup/send-to-mdm-popup.component.ts[0m:[93m5[0m:[93m30[0m - [91merror[0m[90m TS2307: [0mCannot find module 'src/app/entities/IMDMResponse'.
2021-06-02T14:51:03.4642778Z
2021-06-02T14:51:03.4643427Z [7m5[0m import { IMDMResponse } from 'src/app/entities/IMDMResponse';
2021-06-02T14:51:03.4644246Z [7m [0m [91m ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[0m
2021-06-02T14:51:03.4645318Z [96mapp/ui/dealflow/tests-dealflow/dealflow.spec.ts[0m:[93m1[0m:[93m37[0m - [91merror[0m[90m TS2307: [0mCannot find module '../../../entities/ISecondaryPortfolio'.
2021-06-02T14:51:03.4645885Z
2021-06-02T14:51:03.4646561Z [7m1[0m import { ISecondaryPortfolio } from '../../../entities/ISecondaryPortfolio';
2021-06-02T14:51:03.4647398Z [7m [0m [91m ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[0m
2021-06-02T14:51:03.4648510Z [96mapp/ui/funds/fund-list/create-fund/create-fund.component.spec.ts[0m:[93m2[0m:[93m27[0m - [91merror[0m[90m TS2307: [0mCannot find module '../models/Geography'.
2021-06-02T14:51:03.4649050Z
2021-06-02T14:51:03.4649676Z [7m2[0m import { Geography } from '../models/Geography';
2021-06-02T14:51:03.4650403Z [7m [0m [91m ~~~~~~~~~~~~~~~~~~~~~[0m
2021-06-02T14:51:03.4651471Z [96mapp/ui/funds/fund-list/create-fund/create-fund.component.ts[0m:[93m15[0m:[93m27[0m - [91merror[0m[90m TS2307: [0mCannot find module '../models/Geography'.
2021-06-02T14:51:03.4652001Z
2021-06-02T14:51:03.4652603Z [7m15[0m import { Geography } from '../models/Geography';
2021-06-02T14:51:03.4653352Z [7m [0m [91m ~~~~~~~~~~~~~~~~~~~~~[0m
2021-06-02T14:51:03.4653685Z
2021-06-02T14:51:03.5172693Z ##[error]Bash exited with code '1'.
2021-06-02T14:51:03.5208748Z ##[section]Finishing: Generate unit tests
You should add "reporters" inside "coverageReporter" in your karma.config, like so:
coverageReporter: {
type : 'cobertura',
dir : 'TestResults',
subdir: 'coverage',
file: 'code-coverage.xml',
reporters: [ { type: 'cobertura' } ]
},
1. My project is:
Front end project with Node.Js and npm package
Angular CLI: 8.3.23
Node: 12.18.3
OS: win32 x64
Angular: 8.2.14
1. i show you my pipeline
trigger:
tags:
include:
- v*
variables:
- name: ARTIFACTS_FEED_NAME
value: MyFeed
stages:
- stage: Build
jobs:
- job: Build
steps:
- task: NodeTool#0
inputs:
versionSpec: 10.15.x
displayName: Install and use 10.x Node.js version
- task: Npm#1
inputs:
command: install
customRegistry: useFeed
customFeed: $(ARTIFACTS_FEED_NAME)
displayName: Packages restore
- script: |
ls
displayName: Check source output
- script: |
npx ng test --code-coverage --karma-config src/karma-ci.conf.js
condition: succeededOrFailed()
displayName: Generate unit tests report
- script: |
ls src
displayName: Check unit tests output
- task: PublishTestResults#2
condition: succeededOrFailed()
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '**/TestResults/junit/unittest-results.xml'
displayName: Publish unit test results
- task: PublishCodeCoverageResults#1
displayName: Publish code coverage report
condition: succeededOrFailed()
inputs:
codeCoverageTool: Cobertura
# summaryFileLocation: '$(Build.SourcesDirectory)/coverage/**/TestResults/code-coverage.xml'
summaryFileLocation: '**/src/TestResults/coverage/code-coverage.xml'
failIfCoverageEmpty: true
I´m developing this Android application to run on device.
I´m using Ionic and Angular to develop the application.
Now I need to create a custom plugin using Plugman. This plugin should allowed user to authentication using IBM APP ID.
I followed the instructions mention here https://github.com/ibm-cloud-security/appid-clientsdk-android
to create my gradle file.
However, when I run ionic cordova run android --verbose --debug
I get this error
What went wrong:
Execution failed for task :app:processDebugManifest.
java.lang.NullPointerException (no error message)
And I have no clue what could be the root cause. This is my first time I develop a custom plugin.
My suspicious relies on the dependency, but I can not tell what part is causing the issue.
Ionic Framework : #ionic/angular 5.0.7
#angular-devkit/build-angular : 0.803.26
#angular-devkit/schematics : 8.3.26
#angular/cli : 8.3.26
#ionic/angular-toolkit : 2.2.0
Cordova:
Cordova CLI : 10.0.0
Cordova Platforms : android 8.1.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 7 other plugins)
Utility:
cordova-res (update available: 0.14.0) : 0.10.0
native-run (update available: 1.0.0) : 0.3.0
System:
Android SDK Tools : 26.1.1 (C:\\Android\\sdk)
NodeJS : v14.2.0 (C:\Program Files\\nodejs\\node.exe)
npm : 6.14.4
OS : Windows 10```
LOG=======================================
C:\project_cren\plugin\ci-uix-mobile-master>ionic cordova run android --verbose --debug
ionic:lib Terminal info: { ci: false, shell: 'C:\\WINDOWS\\system32\\cmd.exe', tty: false, windows: true } +0ms
ionic:lib CLI global options: { _: [ 'cordova', 'run', 'android' ], help: null, h: null, verbose: true, quiet: null, interactive: false, color: true, confirm: null, json: null, debug: true, project: null, '--': [] } +4ms
ionic:lib:project Project type from config: #ionic/angular (angular) +0ms
ionic:lib:project Project details: { configPath: 'C:\\project_cren\\plugin\\ci-uix-mobile-master\\ionic.config.json', errors: [], context: 'app', type: 'angular' } +1ms
ionic Context: { binPath: 'C:\\Users\\AMANDODOSSANTOSNETO\\AppData\\Roaming\\npm\\node_modules\\#ionic\\cli\\bin\\ionic', libPath: 'C:\\Users\\AMANDODOSSANTOSNETO\\AppData\\Roaming\\npm\\node_modules\\#ionic\\cli', execPath: 'C:\\project_cren\\plugin\\ci-uix-mobile-master', version: '6.7.0' } +0ms
ionic:lib:integrations:cordova:config Loading Cordova Config (config.xml: 'C:\\project_cren\\plugin\\ci-uix-mobile-master\\config.xml', package.json: 'C:\\project_cren\\plugin\\ci-uix-mobile-master\\package.json') +0ms
ionic:commands:run Native platform devices: [] +0ms
ionic:lib:integrations:cordova:config Loading Cordova Config (config.xml: 'C:\\project_cren\\plugin\\ci-uix-mobile-master\\config.xml', package.json: 'C:\\project_cren\\plugin\\ci-uix-mobile-master\\package.json') +11s
ionic:lib:build build options: {
ionic:lib:build '--': [],
ionic:lib:build engine: 'cordova',
ionic:lib:build platform: 'android',
ionic:lib:build project: 'app',
ionic:lib:build verbose: false,
ionic:lib:build configuration: undefined,
ionic:lib:build sourcemaps: undefined,
ionic:lib:build cordovaAssets: true,
ionic:lib:build watch: undefined,
ionic:lib:build type: 'angular'
ionic:lib:build } +0ms
ionic:lib:hooks Looking for ionic:build:before npm script. +0ms
ionic:lib:build Looking for ionic:build npm script. +154ms
ng:analytics getGlobalAnalytics +0ms
ng:analytics Client Analytics config found: false +47ms
ng:analytics Analytics disabled. Ignoring all analytics. +1ms
ng:analytics getSharedAnalytics +0ms
WARNING in ./src/app/invoice-detail/invoice-detail.component.scss
Module Warning (from ./node_modules/postcss-loader/src/index.js):
Warning
(4:3) start value has mixed support, consider using flex-start instead
# ./src/app/invoice-detail/invoice-detail.component.ts 27:41-83
# ./src/app/app.module.ts
# ./src/main.ts
# multi ./src/main.ts
ionic:lib:hooks Looking for ionic:build:after npm script. +40s
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> java.lang.NullPointerException (no error message)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 13s
C:\project_cren\plugin\ci-uix-mobile-master\platforms\android\gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> java.lang.NullPointerException (no error message)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 13s
[ERROR] An error occurred while running subprocess cordova.
cordova.cmd build android --debug --verbose exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
ionic:utils-process onBeforeExit handler: 'process.exit' received +0ms
ionic:utils-process onBeforeExit handler: running 2 functions +1ms
ionic:utils-process error while killing process tree for 17344: Error: Command failed: taskkill /pid 17344 /T /F
ionic:utils-process ERROR: The process "17344" not found.
ionic:utils-process
ionic:utils-process at ChildProcess.exithandler (child_process.js:303:12)
ionic:utils-process at ChildProcess.emit (events.js:315:20)
ionic:utils-process at maybeClose (internal/child_process.js:1051:16)
ionic:utils-process at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) {
ionic:utils-process killed: false,
ionic:utils-process code: 128,
ionic:utils-process signal: null,
ionic:utils-process cmd: 'taskkill /pid 17344 /T /F'
ionic:utils-process } +472ms
ionic:utils-process onBeforeExit handler: error from function: Error: Command failed: taskkill /pid 17344 /T /F
ionic:utils-process ERROR: The process "17344" not found.
ionic:utils-process
ionic:utils-process at ChildProcess.exithandler (child_process.js:303:12)
ionic:utils-process at ChildProcess.emit (events.js:315:20)
ionic:utils-process at maybeClose (internal/child_process.js:1051:16)
ionic:utils-process at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) {
ionic:utils-process killed: false,
ionic:utils-process code: 128,
ionic:utils-process signal: null,
ionic:utils-process cmd: 'taskkill /pid 17344 /T /F'
ionic:utils-process } +21ms
ionic:utils-process error while killing process tree for 2628: Error: Command failed: taskkill /pid 2628 /T /F
ionic:utils-process ERROR: The process "2628" not found.
ionic:utils-process
ionic:utils-process at ChildProcess.exithandler (child_process.js:303:12)
ionic:utils-process at ChildProcess.emit (events.js:315:20)
ionic:utils-process at maybeClose (internal/child_process.js:1051:16)
ionic:utils-process at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) {
ionic:utils-process killed: false,
ionic:utils-process code: 128,
ionic:utils-process signal: null,
ionic:utils-process cmd: 'taskkill /pid 2628 /T /F'
ionic:utils-process } +40ms
ionic:utils-process onBeforeExit handler: error from function: Error: Command failed: taskkill /pid 2628 /T /F
ionic:utils-process ERROR: The process "2628" not found.
ionic:utils-process
ionic:utils-process at ChildProcess.exithandler (child_process.js:303:12)
ionic:utils-process at ChildProcess.emit (events.js:315:20)
ionic:utils-process at maybeClose (internal/child_process.js:1051:16)
ionic:utils-process at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) {
ionic:utils-process killed: false,
ionic:utils-process code: 128,
ionic:utils-process signal: null,
ionic:utils-process cmd: 'taskkill /pid 2628 /T /F'
ionic:utils-process } +8ms
ionic:utils-process processExit: exiting (exit code: 1) +4ms
GRADLE FILE=====================================================================
android {
//compileSdkVersion 29
//buildToolsVersion "29.0.3"
defaultConfig {
manifestPlaceholders = ['appIdRedirectScheme': android.defaultConfig.applicationId]
}
}
dependencies {
implementation 'com.github.ibm-cloud-security:appid-clientsdk-android:6.+'
}
allprojects {
repositories {
google()
jcenter()
maven { url 'https://jitpack.io' }
}
}
JAVA FILE ==============================================
package ibm.com.ibmappidcordovaplugin;
import org.apache.cordova.CordovaPlugin;
import org.apache.cordova.CallbackContext;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import com.ibm.cloud.appid.android.api.AppID;
import com.ibm.cloud.appid.android.api.AuthorizationException;
import com.ibm.cloud.appid.android.api.AuthorizationListener;
import com.ibm.cloud.appid.android.api.LoginWidget;
import com.ibm.cloud.appid.android.api.tokens.AccessToken;
import com.ibm.cloud.appid.android.api.tokens.IdentityToken;
import com.ibm.cloud.appid.android.api.tokens.RefreshToken;
/**
* This class echoes a string called from JavaScript.
*/
public class ibmappidcordovaplugin extends CordovaPlugin {
//PluginResult result = null;
private CallbackContext callbackContext = null;
private static final String SHOW_AUTH = "authentication";
LoginWidget loginWidget;
loginWidget = AppID.getInstance().getLoginWidget();
public ibmappidcordovaplugin(){
AppID.getInstance().initialize(getApplicationContext(), "cdb1c3ab-e8cf-49cf-9dff-9dfa4bf2a898", AppID.REGION_US_SOUTH);
}
#Override
public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
this.callbackContext = callbackContext;
String msg = args.getJSONObject(0).getString("msg");
if (action.equals("authentication")) {
//String message = args.getString(0);
this.coolMethod(msg, callbackContext);
return true;
}
return false;
}
private void coolMethod(String message, CallbackContext callbackContext) {
if (message != null && message.length() > 0) {
auth();
callbackContext.success(create());
} else {
callbackContext.error("Expected one non-empty string argument.");
}
}
private void auth(){
loginWidget.launch(this, new AuthorizationListener() {
#Override
public void onAuthorizationSuccess(final AccessToken accessToken, final IdentityToken identityToken,
RefreshToken refreshToken) {
cordova.getActivity().runOnUiThread(new Runnable() {
#Override
public void run() {
console.log("Name: " + identityToken.getName());
console.log("user: " + accessToken.getScope());
console.log("getIdentities " + identityToken.getIdentities());
console.log("getRaw " + identityToken.getRaw());
for (String name : identityToken.getAudience() ) {
console.log("AUD: " +name);
}
for (String name : identityToken.getAuthenticationMethods() ) {
console.log("AUTH: " +name);
}
try {
JSONObject ob = identityToken.getPayload();
console.log("getPayload " + ob.getString("preferred_username"));
}
catch (Exception e){
console.log("Error: " + e.getMessage());
}
}
});
}
#Override
public void onAuthorizationCanceled() {
}
#Override
public void onAuthorizationFailure (AuthorizationException exception) {
}
});
}
private String create(/*IdentityToken identityToken*/){
String response = "";
try {
JSONObject token = new JSONObject();
String t = "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImFwcElkLWNkYjFjM2FiLWU4Y2YtNDljZi05ZGZmLTlkZmE0YmYyYTg5OC0yMDIwLTA5LTI1VDE1OjE5OjI4LjIxNyIsInZlciI6NH0.eyJpc3MiOiJodHRwczovL3VzLXNvdXRoLmFwcGlkLmNsb3VkLmlibS5jb20vb2F1dGgvdjQvY2RiMWMzYWItZThjZi00OWNmLTlkZmYtOWRmYTRiZjJhODk4IiwiYXVkIjpbIjc5NWUzMmVlZWFjMzIzMTM5YmM5ZWU3YmQ2NWEyMTc5YjNhNzc3ZjgiXSwiZXhwIjoxNjAyOTc2ODg0LCJ0ZW5hbnQiOiJjZGIxYzNhYi1lOGNmLTQ5Y2YtOWRmZi05ZGZhNGJmMmE4OTgiLCJpYXQiOjE2MDI5NzMyODQsImVtYWlsIjoiYW1hbmRvc0Bici5pYm0uY29tIiwibmFtZSI6IlZvbHVudGFyaW8gRmVsaXogZGEgVmlkYSIsInN1YiI6ImMyMjQ3ZWU3LTc3ZDEtNDFhMy04NjQ3LWRmNTNhMWMyMWJiMiIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiIxMjM0NTY3OCIsImdpdmVuX25hbWUiOiJWb2x1bnRhcmlvIiwiZmFtaWx5X25hbWUiOiJGZWxpeiBkYSBWaWRhIiwiaWRlbnRpdGllcyI6W3sicHJvdmlkZXIiOiJjbG91ZF9kaXJlY3RvcnkiLCJpZCI6IjU0NmU5NTk5LWJjMGItNDIxNi04YzljLTQ2N2RjZWQ5NjQ4NCJ9XSwiYW1yIjpbImNsb3VkX2RpcmVjdG9yeSJdfQ.C4_2mj3fx3IwfqH4_O8CR4NtSNpgR7WTbjOz9j1XvrAZS9uiTswMyCn9q8N8pIh6BuP2RTmBhAtnkjAYt0rkHOtEHutf9J79GkpN33-H5P-5k9pqopUuawyFZlfEuH3m76PVnH2XkDUZ1EOTRKrtuHIyYS74tGOYgF8r3hBwjSbFZPTchkNAQmqn5FTgJ6LzUa3xBWt3C1nkvMw3nKrorAUtrsCZXD9PGJKlqJhpZXH9renSRa4KDDwswHzhLGiIghgAmvVoNwOsUWrWbQF88EGDKAkyQRCnTRo2lqdANtYlIwsVitGc9zkje6wDOhjjfZ6g24sj9Id-kK7Sw813aQ";
token.put("name", "Fulando da Silva"/*identityToken.getName()*/);
token.put("email", "fulano#test.com"/*identityToken.getEmail()*/);
token.put("token", t/*identityToken.getRaw()*/);
response = token.toString();
} catch (JSONException e) {
throw new RuntimeException(e);
}
return response;
}
}
I was going through the NestJS official docs. I set up PostgreSQL on Heroku, connected with TypeORM, run a migration and after that my app started crushing. I tried different approaches and searched blogs/issues on github/questions here, but nothing helped.
Here is an error:
[Nest] 46723 - 05/10/2020, 6:33:42 PM [InstanceLoader] TypeOrmModule dependencies initialized +84ms
[Nest] 46723 - 05/10/2020, 6:33:43 PM [TypeOrmModule] Unable to connect to the database. Retrying (1)... +493ms
/Users/Shared/diploma/be/migration/1589119433066-AddUser.ts:1
import {MigrationInterface, QueryRunner} from "typeorm";
^
SyntaxError: Unexpected token {
at Module._compile (internal/modules/cjs/loader.js:721:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:690:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Function.PlatformTools.load (/***/PROJECT_ROOT/node_modules/typeorm/platform/PlatformTools.js:114:28)
at /***/PROJECT_ROOT/node_modules/typeorm/util/DirectoryExportedClassesLoader.js:39:69
at Array.map (<anonymous>)
Here is my ormconfig.json:
"type": "postgres",
"url": "postgres://***",
"ssl": true,
"extra": {
"ssl": {
"rejectUnauthorized": false
}
},
"entities": ["dist/**/*.entity{.ts,.js}"],
"migrationsTableName": "custom_migration_table",
"migrations": ["migration/*{.ts,.js}"],
"cli": {
"migrationsDir": "migration"
}
}
migration was generated using ts-node ./node_modules/.bin/typeorm migration:generate -n AddUser
I'm using nest start --watch command to start the app.
Migration file {TIMESTAMP}-AddUser.ts:
import {MigrationInterface, QueryRunner} from "typeorm";
export class AddUser1589119433066 implements MigrationInterface {
name = 'AddUser1589119433066'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`CREATE TABLE "users" (...)`, undefined);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`DROP TABLE "users"`, undefined);
}
}
Thanks to #Isolated!
I've changed the ormconfig.json so entities and migrations files looks like this now and it works fine for me:
"entities": ["dist/**/*.entity{.ts,.js}"],
"migrations": ["dist/migration/*{.ts,.js}"],
System
- Node.js version: v10.19.0
- NPM version: 6.13.4
- Strapi version: 3.0.0-Beta.2
- Database: PostgreSQL 10.11
- Operating system: MacOS Catalina
Describe the bug
I am trying to run local Strapi on my Mac. npm run build works well. However, it has some problems with 'start' and 'develop'. When I am trying to start it by pm2 start npm --name "CMS" -- start, it keeps restarting. I have checked the app OUT-logs and there is a couple of errors e.g.
{ error: syntax error at or near "url"
at Connection.parseE (/usr/local/var/www/trip4share-cms/node_modules/pg/lib/connection.js:602:11)
at Connection.parseMessage (/usr/local/var/www/trip4share-cms/node_modules/pg/lib/connection.js:399:19)
at Socket.<anonymous> (/usr/local/var/www/trip4share-cms/node_modules/pg/lib/connection.js:121:22)
at Socket.emit (events.js:198:13)
at addChunk (_stream_readable.js:288:12)
at readableAddChunk (_stream_readable.js:269:11)
at Socket.Readable.push (_stream_readable.js:224:10)
at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
name: 'error',
length: 92,
severity: 'ERROR',
code: '42601',
detail: undefined,
hint: undefined,
position: '50',
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'scan.l',
line: '1128',
routine: 'scanner_yyerror' }
[2020-04-06T21:30:50.439Z] warn The SQL database indexes haven't been generated successfully. Please enable the debug mode for more details.
{ error: syntax error at or near "name"
at Connection.parseE (/usr/local/var/www/trip4share-cms/node_modules/pg/lib/connection.js:602:11)
at Connection.parseMessage (/usr/local/var/www/trip4share-cms/node_modules/pg/lib/connection.js:399:19)
at Socket.<anonymous> (/usr/local/var/www/trip4share-cms/node_modules/pg/lib/connection.js:121:22)
at Socket.emit (events.js:198:13)
at addChunk (_stream_readable.js:288:12)
at readableAddChunk (_stream_readable.js:269:11)
at Socket.Readable.push (_stream_readable.js:224:10)
at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
name: 'error',
length: 93,
severity: 'ERROR',
code: '42601',
detail: undefined,
hint: undefined,
position: '49',
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'scan.l',
line: '1128',
routine: 'scanner_yyerror' }
[2020-04-06T21:30:50.439Z] warn The SQL database indexes haven't been generated successfully. Please enable the debug mode for more details.
When I am running npm run start I am getting the following error.
23 ],
__knexQueryUid: '4301a348-badc-484f-a418-4f0f5ab4a2a6',
sql:
'update "core_store" set "key" = ?, "environment" = ?, "tag" = ?, "value" = ?, "type" = ? where "id" = ?',
returning: undefined }
{ method: 'insert',
options: {},
timeout: false,
cancelOnTimeout: false,
bindings:
[ 'development',
'plugin_upload_provider',
'',
'object',
'{"provider":"local","name":"Local server","enabled":true,"sizeLimit":1000000}' ],
__knexQueryUid: '797edf19-aaab-43ff-a2f3-7c25519fb700',
sql:
'insert into "core_store" ("environment", "key", "tag", "type", "value") values (?, ?, ?, ?, ?) returning "id"',
returning: 'id' }
{ method: 'select',
options: {},
timeout: false,
cancelOnTimeout: false,
bindings: [ 'plugin_users-permissions_advanced', '', '', 1 ],
__knexQueryUid: '51c83527-e289-4c2b-bb0c-48fe7fd34d86',
sql:
'select "core_store".* from "core_store" where "core_store"."key" = ? and "core_store"."environment" = ? and "core_store"."tag" = ? limit ?' }
[2020-04-06T22:20:17.365Z] error error: duplicate key value violates unique constraint "core_store_pkey"
at Connection.parseE (/usr/local/var/www/trip4share-cms/node_modules/pg/lib/connection.js:602:11)
at Connection.parseMessage (/usr/local/var/www/trip4share-cms/node_modules/pg/lib/connection.js:399:19)
at Socket.<anonymous> (/usr/local/var/www/trip4share-cms/node_modules/pg/lib/connection.js:121:22)
at Socket.emit (events.js:198:13)
at addChunk (_stream_readable.js:288:12)
at readableAddChunk (_stream_readable.js:269:11)
at Socket.Readable.push (_stream_readable.js:224:10)
at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! trip4share-cms#1.0.0 start: `strapi start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the trip4share-cms#1.0.0 start 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/Lord-of-the-Mac/.npm/_logs/2020-04-06T22_20_17_400Z-debug.log
The remote version on Linux works well. What should I check?
When attempting to package a nuxt component, I get the above error. I am running nuxt 2.4.5, #babel/core 7.0.0 and rollup 1.4.0.
Does anyone have any thoughts?
Thanks in advance..
npm run script:
"build:es": "rollup --config build/rollup.config.js --format es --file dist/cxl-nuxt-map.esm.js"
Command :
nr build:es
cxl-nuxt-map#1.0.0 build:es /Users/userinfo/Projects/cxl-nuxt-map rollup --config build/rollup.config.js --format es --file dist/cxl-nuxt-map.esm.js
index.js → dist/cxl-nuxt-map.esm.js...
Stack Trace:
[!] (babel plugin) Error: .sourceMap must be a boolean, "inline", "both", or undefined
index.js
Error: .sourceMap must be a boolean, "inline", "both", or undefined
at assertSourceMaps (/Users/dan.mahoney/Projects/cxl-nuxt-map/node_modules/#babel/core/lib/config/validation/option-assertions.js:65:11)
at Object.keys.forEach.key (/Users/dan.mahoney/Projects/cxl-nuxt-map/node_modules/#babel/core/lib/config/validation/options.js:107:5)
at Array.forEach (<anonymous>)
at validateNested (/Users/dan.mahoney/Projects/cxl-nuxt-map/node_modules/#babel/core/lib/config/validation/options.js:83:21)
at validate (/Users/dan.mahoney/Projects/cxl-nuxt-map/node_modules/#babel/core/lib/config/validation/options.js:74:10)
at file (/Users/dan.mahoney/Projects/cxl-nuxt-map/node_modules/#babel/core/lib/config/config-chain.js:174:34)
at cachedFunction (/Users/dan.mahoney/Projects/cxl-nuxt-map/node_modules/#babel/core/lib/config/caching.js:33:19)
at buildRootChain (/Users/dan.mahoney/Projects/cxl-nuxt-map/node_modules/#babel/core/lib/config/config-chain.js:120:36)
at loadPrivatePartialConfig (/Users/dan.mahoney/Projects/cxl-nuxt-map/node_modules/#babel/core/lib/config/partial.js:85:55)
at Object.loadPartialConfig (/Users/dan.mahoney/Projects/cxl-nuxt-map/node_modules/#babel/core/lib/config/partial.js:110:18)
at Object.babel.loadPartialConfig (/Users/dan.mahoney/Projects/cxl-nuxt-map/node_modules/rollup-plugin-babel/src/index.js:80:20)
at /Users/dan.mahoney/Projects/cxl-nuxt-map/node_modules/rollup/dist/rollup.js:17051:25
at process.runNextTicks [as _tickCallback] (internal/process/next_tick.js:47:5)
at Function.Module.runMain (internal/modules/cjs/loader.js:804:11)
at internal/main/run_main_module.js:21:11
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! cxl-nuxt-map#1.0.0 build:es: `rollup --config build/rollup.config.js --format es --file dist/cxl-nuxt-map.esm.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the cxl-nuxt-map#1.0.0 build:es 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/dan.mahoney/.npm/_logs/2019-03-01T20_10_17_889Z-debug.log
Rollup.config.js:
/* rollup.config.js */
import vue from 'rollup-plugin-vue';
import babel from 'rollup-plugin-babel';
import commonjs from 'rollup-plugin-commonjs';
import postcss from 'rollup-plugin-postcss';
import replace from 'rollup-plugin-replace';
import { plugin as analyze } from 'rollup-plugin-analyzer';
export default {
input: 'index.js',
output: {
name: 'CxlNuxtMap',
exports: 'named',
},
plugins: [
postcss({
extensions: ['.css'],
runtimeHelpers: true,
exclude: 'node_modules/**',
}),
vue(),
babel({
exclude: 'node_modules/**',
}),
replace({
'process.env.INCLUDE_DEPS': JSON.stringify('false'),
}),
replace({
'process.env.NODE_ENV': JSON.stringify('production'),
}),
commonjs({
namedExports: {},
}),
analyze({ stdout: true }),
],
};
Found in the problem in my .babelrc file. The offending line was:
"sourceMap": "true",
should be:
"sourceMaps": true,