GithubHelp home page GithubHelp logo

Comments (9)

QingWei-Li avatar QingWei-Li commented on May 21, 2024

以 sudo 执行会对后续带来许多问题,所以此处默认禁止了 sudo。推荐修改 /usr/local/lib/node_modules/ 的权限为当前用户

sudo chown -R  用户名 /usr/local/lib/node_modules/

当然你一定要用 sudo 执行的话,每次带上 --allow-root 参数

#33 #32 #29

from cooking.

JayWii avatar JayWii commented on May 21, 2024

@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.

QingWei-Li avatar QingWei-Li commented on May 21, 2024

确保 npm 是 3.0 以上

from cooking.

QingWei-Li avatar QingWei-Li commented on May 21, 2024

@JayWii 升级到 3.0 以上后需要重新安装 cooking,因为这里用到了 3.0 的一个特性——会把依赖安装到同一目录下(node_modules)而不是以前的嵌套的形式。

from cooking.

JayWii avatar JayWii commented on May 21, 2024

@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.

QingWei-Li avatar QingWei-Li commented on May 21, 2024

@JayWii 估计是有缓存了,安装时带上 --force

npm i cooking -g --force

from cooking.

JayWii avatar JayWii commented on May 21, 2024

@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.

QingWei-Li avatar QingWei-Li commented on May 21, 2024

看起来一开始你是用 cnpm 安装的,建议先清理下 cnpm 的缓存,或者先卸载掉(当时安装时还是 [email protected]),然后确保在 npm 3.0 的版本下使用 cnpm 或者最好直接使用 npm (带上 --registry=https://registry.npm.taobao.org)

亦或者用 nvm 或者 n 之类的来安装 node

from cooking.

JayWii avatar JayWii commented on May 21, 2024

@QingWei-Li 非常非常感谢,我的问题已经解决啦!

from cooking.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.