Comments (9)
以 sudo 执行会对后续带来许多问题,所以此处默认禁止了 sudo。推荐修改 /usr/local/lib/node_modules/ 的权限为当前用户
sudo chown -R 用户名 /usr/local/lib/node_modules/
当然你一定要用 sudo 执行的话,每次带上 --allow-root 参数
from cooking.
@QingWei-Li 您好,非常感谢解决了权限问题,但是不知道为什么又出现了另一个错误,显示如下:
[cooking] - generator project
[22:46:07] No local gulp install found in /usr/local/lib/node_modules/.cooking_npminstall/cooking/0.4.2/cooking/.cooking/node_modules/slush-cooking-vue
[slush] This is an issue with the `slush-cooking-vue` generator
from cooking.
确保 npm 是 3.0 以上
from cooking.
@JayWii 升级到 3.0 以上后需要重新安装 cooking,因为这里用到了 3.0 的一个特性——会把依赖安装到同一目录下(node_modules)而不是以前的嵌套的形式。
from cooking.
@QingWei-Li 非常感谢,安装成功了,但是运行到这一步,出现了奇怪的问题,重点的这个问题没任何错误提示:
mac@Mac cookingTest$ cooking init vue
[cooking] - generator project
[slush] Using slushfile /usr/local/lib/node_modules/.cooking_npminstall/cooking/0.4.2/cooking/.cooking/node_modules/slush-cooking-vue/slushfile.js
[13:12:55] Starting 'cooking-vue:default'...
? Give your app a name cookingVue
? Give your app a description A vue project.
? Private? Yes
? Need dev server? Yes
? What CSS preprocessor do you want to use? Only CSS
? git repository
? author Jaywii
? license MIT
? Continue? Yes
mac@Mac cookingTest$
这是我运行cooking init后完整的代码块,最后执行continue之后没有任何反应,目录下也没产生任何文件
from cooking.
@JayWii 估计是有缓存了,安装时带上 --force
npm i cooking -g --force
from cooking.
@QingWei-Li 还是不行啊,执行
npm i cooking -g --force
之后显示了这样的一些WARN:
mac@Mac cookingTest$ npm i cooking -g --force
npm WARN using --force I sure hope you know what you are doing.
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN skippingAction Module is inside a symlinked module: not running remove [email protected] node_modules/cooking/node_modules/babel-core/node_modules/convert-source-map
npm WARN skippingAction Module is inside a symlinked module: not running remove [email protected] node_modules/cooking/node_modules/babel-core/node_modules/debug
npm WARN skippingAction Module is inside a symlinked module: not running remove [email protected] node_modules/cooking/node_modules/babel-core/node_modules/json5
npm WARN skippingAction Module is inside a symlinked module: not running remove [email protected] node_modules/cooking/node_modules/babel-core/node_modules/lodash
npm WARN skippingAction Module is inside a symlinked module: not running remove [email protected] node_modules/cooking/node_modules/babel-core/node_modules/minimatch
执行结束之后再次执行 init 还是没反应
from cooking.
看起来一开始你是用 cnpm 安装的,建议先清理下 cnpm 的缓存,或者先卸载掉(当时安装时还是 [email protected]),然后确保在 npm 3.0 的版本下使用 cnpm 或者最好直接使用 npm (带上 --registry=https://registry.npm.taobao.org)
亦或者用 nvm 或者 n 之类的来安装 node
from cooking.
@QingWei-Li 非常非常感谢,我的问题已经解决啦!
from cooking.
Related Issues (20)
- 怎么设置cooking编译出的js名称 HOT 2
- cooking build 报错 HOT 1
- use cooking with vue-router on get started use-case HOT 2
- cooking build 报错(新建的vue模板)希望尽快答复,急 HOT 1
- Setting cooking env: remember to prepend process.env. HOT 4
- 打包源码时,不将vue打包进程序中
- No local gulp install found in C:\Program Files\nodejs\node_modules\slush-cooking-vue HOT 2
- 开发多页面应用,v开头的文件名(eg:voted文件)无法编译运行。
- scss load image Module not found: Error: Can't resolve '../../images/xx.png'
- compile error [Extract Text Plugin (Loader) Invalid Options]
- watch与build均无法在ie11下运行
- Error: Cannot find module 'gulp-install' HOT 2
- This is an issue with the `slush-cooking-vue` generator
- 项目里静态的excel文件要如何配置才能打包入dist?
- 想问问设置dist的目录,但是npm run dev 之后但是全局搜索都在不到, 到底这个webserver所运行的目录根目录设置在那里, 十分崩溃
- 想问问设置dist的目录,但是npm run dev 之后但是全局搜索都在不到, 到底这个webserver所运行的目录根目录设置在那里, 十分崩溃
- 如何用es6语法去启动cooking
- [email protected] TypeError: Cannot read property 'query' of undefined at getLoaderWithQuery HOT 1
- 浏览器不刷新
- cooking-cli 在typescript 项目中无法导入es6编写的vue文件
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cooking.