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

Error while I try generate a project #198

Closed
davidenq opened this issue Oct 13, 2016 · 6 comments
Closed

Error while I try generate a project #198

davidenq opened this issue Oct 13, 2016 · 6 comments

Comments

@davidenq
Copy link

Hi!, I installed vue-init following steps that describes at vue-init respositories, but when I run vue init webpack example or vue init I get the next error:

module.js:457
    throw err;
    ^

Error: Cannot find module './src/init'
    at Function.Module._resolveFilename (module.js:455:15)
    at Function.Module._load (module.js:403:25)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/lib/node_modules/vue-cli/node_modules/gulp-sourcemaps/index.js:4:9)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)

Ubuntu: 16.04 64-bit,
Proccessor: Intel® Core™ i5 CPU M 460 @ 2.53GHz × 4
Node: 6.7.0
npm: 3.10.3

Thanks!

@Phunky
Copy link

Phunky commented Oct 13, 2016

I'm getting the same

os x sierra
Macbook Air (2011)
Node: 6.8.0
npm: 3.10.8

@Christilut
Copy link

Christilut commented Oct 13, 2016

Same here

Ubuntu 16.04
Vue-cli version 2.4.0
Node 6.8.0
npm 3.10.8

Happens on vue init but also vue init webpack my-project

@brysem
Copy link

brysem commented Oct 13, 2016

TEMPORARY SOLUTION

There is an issue with the gulp-sourcemaps module that is installed with vue-cli.
Please see the issue here: gulp-sourcemaps/gulp-sourcemaps#242

I fixed the issue finally after manually downloading the gulp-sourcemaps repository and placing its contents in the gulp-sourcemaps folder found in the node_modules of your vue-cli installation.

When installing vue-cli, the "src" folder for gulp-sourcemaps was not installed. By copying the repository which includes the "src" folder, I was able to get it running.

@davidenq
Copy link
Author

@brysem thanks for your temporary solution. Now, it worked for me.

If you want automatically replace folder then you could use the bellow command in the node_modules of your vue-cli installation:
I executed this command at Ubuntu:

sudo sh -c "wget https://github.com/floridoo/gulp-sourcemaps/archive/master.zip ; unzip master.zip ; rm -rf gulp-sourcemaps ; mv gulp-sourcemaps-master/ gulp-sourcemaps/ ; rm -rf master.zip"

Note: I used the master version because src has never been part of the repo for releases

@posva
Copy link
Member

posva commented Oct 14, 2016

@davidenq Updating vue-cli seems to fix the issue
If the error still persist, tell me so I can reopen the issue

@posva posva closed this as completed Oct 14, 2016
@rlam3
Copy link

rlam3 commented Oct 8, 2017

same issue with mac ... any workaround?
Would love to know what version of vue-cli and vue and node with npm versions are stupposed to work properly...

@Phunky were you able to find a workaround ? If so, do you mind sharing with us? Thanks!

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

No branches or pull requests

6 participants