Closed apawn closed 6 years ago
Hi @apawn , let me investigate and get back to you later today! 👍
Hey @apawn ! Do you call this command in a project where you have a package.json
setup already? If not, could you tell me a bit about where you're running this from?
Hi @ev1stensberg , thans for your reply , there is no package.json file when i exe that command , there was a empty folder .
and this time, i call npm init first ,but also met the same problem .
➜ wktest npm init This utility will walk you through creating a package.json file. It only covers the most common items, and tries to guess sensible defaults.
See npm help json
for definitive documentation on these fields
and exactly what they do.
Use npm install <pkg> --save
afterwards to install a package and
save it as a dependency in the package.json file.
Press ^C at any time to quit. package name: (wktest) version: (1.0.0) description: entry point: (index.js) test command: git repository: keywords: author: license: (ISC) About to write to /Users/xuyuanshuo.005/Documents/my-project/wktest/package.json:
{ "name": "wktest", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC" }
Is this ok? (yes) ➜ wktest webpack-cli init webpack-addons-demo yarn global v0.24.5 warning No license field [1/4] 🔍 Resolving packages... [2/4] 🚚 Fetching packages... [3/4] 🔗 Linking dependencies... warning "babel-loader@7.1.2" has unmet peer dependency "webpack@2 || 3". [4/4] 📃 Building fresh packages... warning "webpack-addons-demo@1.5.0" has no binaries warning No license field ✨ Done in 2.95s. events.js:182 throw er; // Unhandled 'error' event ^
Error: Cannot find module '/Users/xuyuanshuo.005/.nvm/versions/node/v8.0.0/lib/node_modules/webpack-addons-demo'
at Function.Module._resolveFilename (module.js:485:15)
at Function.require.resolve (/Users/xuyuanshuo.005/.nvm/versions/node/v8.0.0/lib/node_modules/webpack-cli/node_modules/v8-compile-cache/v8-compile-cache.js:162:23)
at options.forEach.path (/Users/xuyuanshuo.005/.nvm/versions/node/v8.0.0/lib/node_modules/webpack-cli/dist/init/index.js:28:38)
at Array.forEach (native)
at WebpackGenerator.initializing (/Users/xuyuanshuo.005/.nvm/versions/node/v8.0.0/lib/node_modules/webpack-cli/dist/init/index.js:27:13)
at Object.
The version of main utils as list .
➜ wktest node -v v8.0.0 ➜ wktest npm -v 5.0.0 ➜ wktest webpack -v 3.5.3 ➜ wktest webpack-cli -v 2.0.1 ➜ wktest
thanks
it sames like the port was conficted .
Did you fix the issue? Trying to repro locally, but mine works!
@ev1stensberg it doesn't work, but thank you anyway.
I have made a trouble with executing 'webpack-cli init webpack-addons-demo ',
the error was
Error: Cannot find module '/Users/xuyuanshuo.005/.nvm/versions/node/v8.0.0/lib/node_modules/webpack-addons-demo' at Function.Module._resolveFilename (module.js:485:15) at Function.require.resolve (/Users/xuyuanshuo.005/.nvm/versions/node/v8.0.0/lib/node_modules/webpack-cli/node_modules/v8-compile-cache/v8-compile-cache.js:162:23) at options.forEach.path (/Users/xuyuanshuo.005/.nvm/versions/node/v8.0.0/lib/node_modules/webpack-cli/dist/init/index.js:28:38) at Array.forEach (native) at WebpackGenerator.initializing (/Users/xuyuanshuo.005/.nvm/versions/node/v8.0.0/lib/node_modules/webpack-cli/dist/init/index.js:27:13) at Object. (/Users/xuyuanshuo.005/.nvm/versions/node/v8.0.0/lib/node_modules/webpack-cli/node_modules/yeoman-generator/lib/index.js:412:25)
at /Users/xuyuanshuo.005/.nvm/versions/node/v8.0.0/lib/node_modules/webpack-cli/node_modules/run-async/index.js:25:25
at Promise ()
at /Users/xuyuanshuo.005/.nvm/versions/node/v8.0.0/lib/node_modules/webpack-cli/node_modules/run-async/index.js:24:19
at self.env.runLoop.add.completed (/Users/xuyuanshuo.005/.nvm/versions/node/v8.0.0/lib/node_modules/webpack-cli/node_modules/yeoman-generator/lib/index.js:413:11)
at runCallback (timers.js:800:20)
at tryOnImmediate (timers.js:762:5)
at processImmediate [as _immediateCallback] (timers.js:733:5)
when i use webpack-addons-react , i also have met this .
so i am sure this is my fault, but couldn't know why, please help me .
thank you !