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

can't find module "webpack" #8

Open
noerrornowork opened this issue Apr 6, 2018 · 2 comments
Open

can't find module "webpack" #8

noerrornowork opened this issue Apr 6, 2018 · 2 comments

Comments

@noerrornowork
Copy link

here is the error log:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Users\Administrator\AppData\Roaming\npm\node_modules\cnpm\node_modules\npm\bin\npm-cli.js',
1 verbose cli '--userconfig=C:\Users\Administrator\.cnpmrc',
1 verbose cli '--disturl=https://npm.taobao.org/mirrors/node',
1 verbose cli '--registry=https://registry.npm.taobao.org',
1 verbose cli 'run',
1 verbose cli 'server' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'preserver', 'server', 'postserver' ]
5 info lifecycle [email protected]preserver: [email protected]
6 info lifecycle [email protected]
server: [email protected]
7 verbose lifecycle [email protected]server: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]
server: PATH: C:\Users\Administrator\AppData\Roaming\npm\node_modules\cnpm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Administrator\Documents\HBuilderProjects\项目实战-手机7881页面\test-app01\node_modules.bin;C:\Users\Administrator\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\Administrator\bin;C:\app\Administrator\product\11.2.0\dbhome_1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\MySQL\MySQL Server 5.5\bin;F:\tools\Brackets\command;C:\Program Files\Git\cmd;C:\Program Files\nodejs;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;C:\Users\Administrator\AppData\Roaming\npm;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl
9 verbose lifecycle [email protected]server: CWD: C:\Users\Administrator\Documents\HBuilderProjects\项目实战-手机7881页面\test-app01
10 silly lifecycle [email protected]
server: Args: [ '/d /s /c',
10 silly lifecycle 'webpack-dev-server --content-base ./app --port 8083' ]
11 silly lifecycle [email protected]server: Returned: code: 1 signal: null
12 info lifecycle [email protected]
server: Failed to exec server script
13 verbose stack Error: [email protected] server: webpack-dev-server --content-base ./app --port 8083
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (C:\Users\Administrator\AppData\Roaming\npm\node_modules\cnpm\node_modules\npm\node_modules\npm-lifecycle\index.js:283:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess. (C:\Users\Administrator\AppData\Roaming\npm\node_modules\cnpm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:925:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid [email protected]
15 verbose cwd C:\Users\Administrator\Documents\HBuilderProjects\项目实战-手机7881页面\test-app01
16 verbose Windows_NT 10.0.16299
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Users\Administrator\AppData\Roaming\npm\node_modules\cnpm\node_modules\npm\bin\npm-cli.js" "--userconfig=C:\Users\Administrator\.cnpmrc" "--disturl=https://npm.taobao.org/mirrors/node" "--registry=https://registry.npm.taobao.org" "run" "server"
18 verbose node v8.9.3
19 verbose npm v5.8.0
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] server: webpack-dev-server --content-base ./app --port 8083
22 error Exit status 1
23 error Failed at the [email protected] server script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

@lcxfs1991
Copy link
Contributor

Could you provide more information?

@noerrornowork
Copy link
Author

Uncaught Error: Cannot find module 'vue'
at webpackMissingModule (VM4365 Home.vue:29)
at eval (VM4365 Home.vue:29)
at Module../src/components/tabbars/Home.vue (bundle.js:2313)
at webpack_require (bundle.js:1429)
at fn (bundle.js:803)
at eval (router.js:15)
at Object../src/router.js (bundle.js:2513)
at webpack_require (bundle.js:1429)
at fn (bundle.js:803)
at eval (main.js:13)
webpackMissingModule @ VM4365 Home.vue:29
(anonymous) @ VM4365 Home.vue:29
./src/components/tabbars/Home.vue @ bundle.js:2313
webpack_require @ bundle.js:1429
fn @ bundle.js:803
(anonymous) @ router.js:15
./src/router.js @ bundle.js:2513
webpack_require @ bundle.js:1429
fn @ bundle.js:803
(anonymous) @ main.js:13
./src/main.js @ bundle.js:2501
webpack_require @ bundle.js:1429
fn @ bundle.js:803
(anonymous) @ client:3
0 @ bundle.js:2524
webpack_require @ bundle.js:1429
(anonymous) @ bundle.js:1499
(anonymous) @ bundle.js:1502
vue.js:8552 You are running Vue in development mode.
Make sure to turn on production mode when deploying for production.
See more tips at https://vuejs.org/guide/deployment.html
client:71 [WDS] Hot Module Replacement enabled.

I have already install and config vue-loader,but still remian this problem
as follows:
this is my package.json file:
{
"name": "webpack-vue",
"version": "1.0.0",
"main": "main.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1",
"build": "webpack",
"dev": "webpack-dev-server --inline --open --port 3222 --contentBase src --hot"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"babel-core": "^6.26.3",
"babel-loader": "^7.1.1",
"babel-plugin-component": "^1.1.1",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.7.0",
"babel-preset-stage-0": "^6.24.1",
"bootstrap": "^3.3.7",
"css-loader": "^1.0.0",
"file-loader": "^2.0.0",
"html-webpack-plugin": "^3.2.0",
"jquery": "^3.3.1",
"less": "^3.8.1",
"less-loader": "^4.1.0",
"style-loader": "^0.23.0",
"url-loader": "^1.1.1",
"vue": "^2.5.17",
"vue-loader": "^15.4.1",
"vue-style-loader": "^4.1.2",
"vue-template-compiler": "^2.5.17",
"webpack": "^4.17.2",
"webpack-cli": "^3.1.0",
"webpack-dev-server": "^3.1.7"
},
"description": "",
"dependencies": {
"mint-ui": "^2.2.13",
"vue-router": "^3.0.1"
}
}

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

2 participants