Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/455.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript CoffeeScript无法从复制的目录运行_Javascript_Web Services_Node.js_Coffeescript_Foreman - Fatal编程技术网

Javascript CoffeeScript无法从复制的目录运行

Javascript CoffeeScript无法从复制的目录运行,javascript,web-services,node.js,coffeescript,foreman,Javascript,Web Services,Node.js,Coffeescript,Foreman,在一个目录中,我有一个CoffeeScript应用程序,当我键入“foreman start”时,它可以正常运行 在另一个目录中,我复制了该目录中的所有内容,并再次键入“foreman start”。但它没有运行。相反,我得到了这个错误 20:44:39 web.1 | started with pid 90836 20:44:40 web.1 | 20:44:40 web.1 | node.js:201 20:44:40 web.1 | thr

在一个目录中,我有一个CoffeeScript应用程序,当我键入“foreman start”时,它可以正常运行

在另一个目录中,我复制了该目录中的所有内容,并再次键入“foreman start”。但它没有运行。相反,我得到了这个错误

20:44:39 web.1     | started with pid 90836
20:44:40 web.1     | 
20:44:40 web.1     | node.js:201
20:44:40 web.1     |         throw e; // process.nextTick error, or 'error' event on first tick
20:44:40 web.1     |               ^
20:44:40 web.1     | Error: ENOENT, no such file or directory '/Users/cypher/git/heroku/falling-lightning-4940/node_modules/.bin/package.json'
20:44:40 web.1     |     at Object.openSync (fs.js:230:18)
20:44:40 web.1     |     at Object.readFileSync (fs.js:120:15)
20:44:40 web.1     |     at Object.<anonymous> (/Users/cypher/git/heroku/falling-lightning-4940/node_modules/.bin/nodemon:10:26)
20:44:40 web.1     |     at Module._compile (module.js:432:26)
20:44:40 web.1     |     at Object..js (module.js:450:10)
20:44:40 web.1     |     at Module.load (module.js:351:31)
20:44:40 web.1     |     at Function._load (module.js:310:12)
20:44:40 web.1     |     at Array.0 (module.js:470:10)
20:44:40 web.1     |     at EventEmitter._tickCallback (node.js:192:40)
20:44:40 web.1     | process terminated
20:44:40 system    | sending SIGTERM to all processes
20:44:39 web.1 |从pid 90836开始
20:44:40网页1 |
20:44:40 web.1 | node.js:201
20:44:40 web.1 |抛出e;//process.nextTick错误,或第一次勾选时的“error”事件
20:44:40网页1 |^
20:44:40 web.1 |错误:enoint,没有这样的文件或目录“/Users/cypher/git/heroku/falling-lightning-4940/node_modules/.bin/package.json”
20:44:40 web.1 | at Object.openSync(fs.js:230:18)
20:44:40 web.1 | at Object.readFileSync(fs.js:120:15)
20:44:40 web.1 | at Object。(/Users/cypher/git/heroku/falling-lightning-4940/node_modules/.bin/nodemon:10:26)
20:44:40 web.1 | at Module._编译(Module.js:432:26)
20:44:40 web.1 | at Object..js(module.js:450:10)
20:44:40 web.1 | at Module.load(Module.js:351:31)
20:44:40 web.1 | at函数。_加载(module.js:310:12)
20:44:40 web.1 | at Array.0(module.js:470:10)
20:44:40 web.1 | at EventEmitter._tickCallback(node.js:192:40)
20:44:40 web.1 |进程终止
20:44:40系统|向所有进程发送SIGTERM

我不明白。这两个目录应该完全相同。这是怎么发生的?

我怀疑这部分向我们展示了问题:

/Users/cypher/git/heroku/falling-lightning-4940/node_modules/.bin/package.json

大多数复制方法不会复制使用
的文件/目录。副本中可能缺少
.bin
目录。

因此,可以对此采取什么措施?此外,我还以为这些命令正在服务器上运行。但这是我电脑上的路径。这些命令正在我的计算机上运行?如果在服务器上运行时,桌面上的路径显示出来,这可能意味着您在某个地方硬编码了完整的路径。如果您不知道路径的位置,我建议您将代码全部或部分变灰。我发现这是因为目录中有一个空格。如果没有空间,那么它可以编译。你知道为什么吗?@javascriptninja我在错误的路径中没有看到空格。空间在哪里?您的计算机和服务器的环境是什么?