Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vue create does only create package.json & package-lock.json #3669

Closed
baermathias opened this issue Mar 19, 2019 · 4 comments
Closed

vue create does only create package.json & package-lock.json #3669

baermathias opened this issue Mar 19, 2019 · 4 comments

Comments

@baermathias
Copy link

Version

3.5.1

Environment info

  System:
    OS: Linux 5.0 Ubuntu 18.04.2 LTS (Bionic Beaver)
    CPU: (8) x64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
  Binaries:
    Node: 10.15.0 - ~/.nvm/versions/node/v10.15.0/bin/node
    Yarn: Not Found
    npm: 6.4.1 - ~/.nvm/versions/node/v10.15.0/bin/npm
  Browsers:
    Chrome: 72.0.3626.109
    Firefox: 65.0.1
  npmGlobalPackages:
    @vue/cli: 3.5.1


Steps to reproduce

Install vue:
npm install -g @vue/cli

create project:
vue create projectname

go to project dir and run:
cd projectname

npm run serve

What is expected?

A running project

What is actually happening?

Getting error message:
npm ERR! missing script: serve

vue has only created 3 files after vue create projectname: package.json, package-lock.json, README.md

If I try to create the project with vue ui, the same files are being created but a different error message in the browser:
NO_MODULES

@LinusBorg
Copy link
Member

Possibly related to #3664

@baermathias baermathias changed the title vue create does only create package.json & package-lock.json vue create does only create package.json & package-lock.json Mar 19, 2019
@baermathias
Copy link
Author

Setting NODE_ENV to development solves the issue:
export NODE_ENV=development

But then another error appears:

ERROR  Failed to compile with 1 errors 
error  in ./src/main.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: [BABEL] ./src/main.js: Cannot find module '@babel/preset-env/data/built-ins.json'

@baermathias
Copy link
Author

Solved it by changing the following setting in babel.config.js:

module.exports = {
  presets: [
    '@vue/app'
  ]
}

to:

module.exports = {
  presets: [
    '@babel/preset-env'
  ]
}

@haoqunjiang
Copy link
Member

FYI it's due to the release of babel v7.4.0 and is fixed in v7.4.1
See #3671

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants