gpt4 book ai didi

javascript - Node Coffeescript 无法自行注册

转载 作者:行者123 更新时间:2023-12-02 16:26:28 24 4
gpt4 key购买 nike

我正在尝试使用较新版本的 Node (任何> 10.36),这会中断在我的服务器上加载coffeescript。

我的 CoffeeScript 加载如下

require('coffee-script').register()

我收到以下错误:

/Users/mac/Dropbox/chatter-plot/node_modules/coffee-script/lib/coffee-script/register.js:45
Module._extensions[extension](this, filename);
^
Error: Module did not self-register.

我尝试过 CoffeeScript 版本 1.7.11.9.1,但没有什么区别,这让我相信我需要以某种方式以不同的方式实例化 CoffeeScript。

在 Google 上找不到相关解决方案。

最佳答案

删除我的node_modules目录并进行npm安装对我有用。

rm -rf node_modules
npm install

关于javascript - Node Coffeescript 无法自行注册,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28644634/

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