gpt4 book ai didi

node.js - SailsJS 0.11 : ENOENT: no such file or directory, 统计 '.../node_modules/.bin/cdl'

转载 作者:IT老高 更新时间:2023-10-28 23:15:02 24 4
gpt4 key购买 nike

有这个 SailsJS 应用程序可以在我的办公机器上运行,但不能在本地运行,我想知道为什么?我在本地运行linux。在办公室 Mac。在本地我得到

Error: ENOENT: no such file or directory, stat '/home/jiewmeng/Dropbox/meclub/node_modules/.bin/cdl' at Error (native) at Object.fs.statSync (fs.js:849:18) at /home/jiewmeng/Dropbox/meclub/node_modules/include-all/index.js:44:12 at Array.forEach (native) at requireAll (/home/jiewmeng/Dropbox/meclub/node_modules/include-all/index.js:40:9) at /home/jiewmeng/Dropbox/meclub/node_modules/include-all/index.js:50:23 at Array.forEach (native) at requireAll (/home/jiewmeng/Dropbox/meclub/node_modules/include-all/index.js:40:9) at buildDictionary (/home/jiewmeng/Dropbox/meclub/node_modules/sails/node_modules/sails-build-dictionary/index.js:68:14) at Function.module.exports.optional (/home/jiewmeng/Dropbox/meclub/node_modules/sails/node_modules/sails-build-dictionary/index.js:160:9) at Array.async.auto.nodeModulesFolder (/home/jiewmeng/Dropbox/meclub/node_modules/sails/lib/hooks/moduleloader/index.js:379:27) at /home/jiewmeng/Dropbox/meclub/node_modules/sails/node_modules/async/lib/async.js:484:38 at _each (/home/jiewmeng/Dropbox/meclub/node_modules/sails/node_modules/async/lib/async.js:46:13) at Object.async.auto (/home/jiewmeng/Dropbox/meclub/node_modules/sails/node_modules/async/lib/async.js:455:9) at Hook.loadUserHooks (/home/jiewmeng/Dropbox/meclub/node_modules/sails/lib/hooks/moduleloader/index.js:363:13) at Hook.bound [as loadUserHooks] (/home/jiewmeng/Dropbox/meclub/node_modules/sails/node_modules/lodash/dist/lodash.js:729:21) at Hook.initialize (/home/jiewmeng/Dropbox/meclub/node_modules/sails/lib/hooks/userhooks/index.js:29:18) at Hook.bound [as initialize] (/home/jiewmeng/Dropbox/meclub/node_modules/sails/node_modules/lodash/dist/lodash.js:729:21) at /home/jiewmeng/Dropbox/meclub/node_modules/sails/lib/hooks/index.js:75:14 at /home/jiewmeng/Dropbox/meclub/node_modules/sails/node_modules/async/lib/async.js:451:17 at /home/jiewmeng/Dropbox/meclub/node_modules/sails/node_modules/async/lib/async.js:441:17 at _each (/home/jiewmeng/Dropbox/meclub/node_modules/sails/node_modules/async/lib/async.js:46:13) at Immediate.taskComplete (/home/jiewmeng/Dropbox/meclub/node_modules/sails/node_modules/async/lib/async.js:440:13) at processImmediate [as _immediateCallback] (timers.js:374:17)

我正在使用 Sails 0.11。服务器实际上可以从 Sails 0.12 开始,但有一些重大更改,因此我现在坚持使用 0.11。我正在使用 Node 4

最佳答案

我认为您正在使用 dropbox 将办公室笔记本电脑与您的机器同步,由于某些文件被添加到您的项目中,这不会在一个操作系统中引起问题,但会在另一个操作系统中产生问题。

因此,我建议您应该遵循标准做法来克隆项目

  1. 使用 git 或 bitbucket 克隆项目。
  2. 安装依赖 => npm install

不要使用 Dropbox 进行项目同步。使用版本控制系统克隆/拉取代码,并安装所有依赖项

because node-gyp compiles native add-on modules for Node.js with respect to OS

希望在此之后它应该可以正常工作。

如果您不想使用 VCS,则可以按照以下步骤操作:

 # cd /home/jiewmeng/Dropbox/meclub
# sudo rm -rf node_modules
# rm -rf ~/.npm
# npm cache clear
# npm install

这就是你需要做的。

关于node.js - SailsJS 0.11 : ENOENT: no such file or directory, 统计 '.../node_modules/.bin/cdl',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36773623/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com