Home > Enterprise >  what to do about failed *npm ini vue@latest*?
what to do about failed *npm ini vue@latest*?

Time:07-11

npm init vue@latest failed

Installing create-vue@latest led to the error output:

npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '^14.16.0 || >=16.0.0' },
npm WARN EBADENGINE   current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
/home/rsc/.npm/_npx/2f7e7bff16d1c534/node_modules/create-vue/outfile.cjs:5667
  const isFeatureFlagsUsed = typeof (argv.default ?? argv.ts ?? argv.jsx ?? argv.router ?? argv.pinia ?? argv.tests ?? argv.vitest ?? argv.cypress ?? argv.eslint) === "boolean";
                                                   ^

SyntaxError: Unexpected token '?'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
    at internal/main/run_main_module.js:17:47
npm ERR! code 1
npm ERR! path /home/rsc/share/vue-workspace
npm ERR! command failed
npm ERR! command sh -c create-vue

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/rsc/.npm/_logs/2022-07-11T06_06_23_353Z-debug.log

I am running npm on Debian 11. I have installed it by apt-get install npm. dpkg -l tells npm is of version 7.5.2 ds-2.

As I am very new to vue.js - just passed the tutorial - what to do next? My goal is to create client forms for accessing REST services.

CodePudding user response:

npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '^14.16.0 || >=16.0.0' },
npm WARN EBADENGINE   current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }

NPM warns you to update your node version, v14 LTS is fine but v16.x.x is ok too.
If you need the v12 for something else I suggest you to look into NVM for managing multiple Node versions.

  • Related