Error while running command npm run dev

Hi, I am getting an error while running the command “npm run dev”.
I followed all the steps before running the command.
error:

D:\nodemation\n8n>npm run dev

[email protected] dev D:\nodemation\n8n
lerna exec npm run dev --parallel

lerna notice cli v3.19.0
lerna info versioning independent
lerna info Executing command in 6 packages: “npm run dev”
n8n-core: > [email protected] dev D:\nodemation\n8n\packages\core
n8n-core: > npm run watch
n8n: > [email protected] dev D:\nodemation\n8n\packages\cli
n8n: > nodemon
n8n-editor-ui: > [email protected] dev D:\nodemation\n8n\packages\editor-ui
n8n-editor-ui: > npm run serve
n8n-nodes-base: > [email protected] dev D:\nodemation\n8n\packages\nodes-base
n8n-nodes-base: > npm run watch
n8n-node-dev: > [email protected] dev D:\nodemation\n8n\packages\node-dev
n8n-node-dev: > npm run watch
n8n-workflow: > [email protected] dev D:\nodemation\n8n\packages\workflow
n8n-workflow: > npm run watch
n8n: [nodemon] 1.19.4
n8n: [nodemon] to restart at any time, enter rs
n8n: [nodemon] watching dir(s): commands** index.ts src**
n8n: [nodemon] watching extensions: ts
n8n: [nodemon] starting npm start
n8n-core: > [email protected] watch D:\nodemation\n8n\packages\core
n8n-core: > tsc --watch
n8n-editor-ui: > [email protected] serve D:\nodemation\n8n\packages\editor-ui
n8n-editor-ui: > VUE_APP_URL_BASE_API=http://localhost:5678/ vue-cli-service serve
n8n-editor-ui: ‘VUE_APP_URL_BASE_API’ is not recognized as an internal or external command,
n8n-editor-ui: operable program or batch file.
n8n-editor-ui: npm ERR! code ELIFECYCLE
n8n-editor-ui: npm ERR! errno 1
n8n-editor-ui: npm ERR! [email protected] serve: VUE_APP_URL_BASE_API=http://localhost:5678/ vue-cli-service serve
n8n-editor-ui: npm ERR! Exit status 1
n8n-editor-ui: npm ERR!
n8n-editor-ui: npm ERR! Failed at the [email protected] serve script.
n8n-editor-ui: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
n8n-node-dev: > [email protected] watch D:\nodemation\n8n\packages\node-dev
n8n-node-dev: > tsc --watch
n8n-editor-ui: npm ERR! A complete log of this run can be found in:
n8n-editor-ui: npm ERR! C:\Users\Kshitij.bharde\AppData\Roaming\npm-cache_logs\2019-12-10T05_28_53_593Z-debug.log
n8n-editor-ui: npm ERR! code ELIFECYCLE
n8n-editor-ui: npm ERR! errno 1
n8n-editor-ui: npm ERR! [email protected] dev: npm run serve
n8n-editor-ui: npm ERR! Exit status 1
n8n-editor-ui: npm ERR!
n8n-editor-ui: npm ERR! Failed at the [email protected] dev script.
n8n-editor-ui: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
n8n-editor-ui: npm ERR! A complete log of this run can be found in:
n8n-editor-ui: npm ERR! C:\Users\Kshitij.bharde\AppData\Roaming\npm-cache_logs\2019-12-10T05_28_53_801Z-debug.log
lerna ERR! npm run dev exited 2 in ‘n8n-editor-ui’
lerna ERR! npm run dev stdout:

[email protected] dev D:\nodemation\n8n\packages\editor-ui
npm run serve

[email protected] serve D:\nodemation\n8n\packages\editor-ui
VUE_APP_URL_BASE_API=http://localhost:5678/ vue-cli-service serve

lerna ERR! npm run dev stderr:
‘VUE_APP_URL_BASE_API’ is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] serve: VUE_APP_URL_BASE_API=http://localhost:5678/ vue-cli-service serve
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] serve 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! C:\Users\Kshitij.bharde\AppData\Roaming\npm-cache_logs\2019-12-10T05_28_53_593Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: npm run serve
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev 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! C:\Users\Kshitij.bharde\AppData\Roaming\npm-cache_logs\2019-12-10T05_28_53_801Z-debug.log

lerna ERR! npm run dev exited 2 in ‘n8n-editor-ui’
lerna WARN complete Waiting for 5 child processes to exit. CTRL-C to exit immediately.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] dev: lerna exec npm run dev --parallel
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] dev 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! C:\Users\Kshitij.bharde\AppData\Roaming\npm-cache_logs\2019-12-10T05_28_56_146Z-debug.log

Very strange. No idea why it should display that error for you. When I Google for it I find this:

Maybe that helps.

@Kshitij_Bharde, place the env directive before VUE_APP_URL_BASE_API in package.json file. Example:

{
    ...
    "scripts": {
       "serve": "env VUE_APP_URL_BASE_API=http://localhost:5678/ vue-cli-service serve",
    }
    ...
}

I can’t say why, but it only happens on Windows.

1 Like