小编tk4*_*421的帖子

如何修复:“错误 fsevents@2.0.7:平台“linux”与此模块不兼容。

我想将我的网站部署到 Heroku,但出现下一个错误:

error fsevents@2.0.7: The platform "linux" is incompatible with this module.
error Found incompatible module.
Run Code Online (Sandbox Code Playgroud)

我已经尝试升级纱线节点但它没有帮助。我使用 macOS Mojave v 10.14.5,我不明白为什么 linux 在这里。



remote: -----> Installing binaries
remote:        engines.node (package.json):  10.15.3
remote:        engines.npm (package.json):   unspecified (use default)
remote:        engines.yarn (package.json):  unspecified (use default)
remote:        
remote:        Resolving node version 10.15.3...
remote:        Downloading and installing node 10.15.3...
remote:        Using default npm version: 6.4.1
remote:        Resolving yarn version 1.x...
remote:        Downloading and installing yarn (1.17.3)...
remote:        Installed yarn 1.17.3
remote:        
remote: -----> Installing …
Run Code Online (Sandbox Code Playgroud)

heroku node.js npm mern yarnpkg

18
推荐指数
2
解决办法
2万
查看次数

纱线-Node Sass尚不支持我当前的环境

我正在使用Sage WordPress入门主题-https: //github.com/roots/sage

从今天开始,当我运行yarn build(webpack --progress --config /webpack.config.js)时,出现以下错误:模块构建失败:ModuleBuildError:模块构建失败:错误:Node Sass尚不支持您当前的环境:OS X具有不受支持的运行时的64位(72)有关支持哪些环境的更多信息,请参见:https : //github.com/sass/node-sass/releases/tag/v4.8.3

我还尝试通过brew卸载并重新安装node,npm&yarn,但没有任何变化。

如果我运行npm install这是错误

../src/create_string.cpp:17:25: error: no matching constructor for initialization of 'v8::String::Utf8Value'
  v8::String::Utf8Value string(value);
                        ^      ~~~~~
/Users/MYPC/.node-gyp/12.1.0/include/node/v8.h:3002:5: note: candidate constructor not viable: no known conversion from 'v8::Local<v8::Value>' to 'const v8::String::Utf8Value'
      for 1st argument
    Utf8Value(const Utf8Value&) = delete;
    ^
/Users/MYPC/.node-gyp/12.1.0/include/node/v8.h:2995:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
    Utf8Value(Isolate* isolate, Local<v8::Value> obj);
    ^
1 error generated.
make: *** [Release/obj.target/binding/src/create_string.o] Error …
Run Code Online (Sandbox Code Playgroud)

sass node.js webpack package.json yarnpkg

17
推荐指数
3
解决办法
1万
查看次数

使用JHipster 4生成的应用程序在8080上返回空白页,但不在9000上

我用JHipster v4创建了一个应用程序.当我在端口8080上发出请求时,它返回一个空白页面.如果我使用yarn start,并且我向9000端口发出请求,它正确回答.

任何的想法?

jhipster yarnpkg

16
推荐指数
2
解决办法
4185
查看次数

如何在 CircleCI 中为 Docker 镜像构建缓存 Yarn 依赖项?

yarn install现在需要大约 5 分钟。我正在想办法减少它们。

现在在我的 Dockerfile 中,我有以下内容:

COPY package.json yarn.lock node_modules /usr/src/app/
COPY ${YARN_CACHE} /root/.cache/yarn/
WORKDIR /usr/src/app

# We are doing this so that we can make use of layer caching 
# (i.e. most likely yarn deps won't change as often as the app code)
COPY . /usr/src/app

# yarn install
RUN yarn install
Run Code Online (Sandbox Code Playgroud)

在我的圈子文件中,我有

  - restore_cache:
     keys:
       # only restores cache if the yarn file is the same
       - yarn-packages-v4-{{ checksum "yarn.lock" }}
  - run: docker pull …
Run Code Online (Sandbox Code Playgroud)

docker circleci yarnpkg

16
推荐指数
1
解决办法
9997
查看次数

我如何确认我正确使用了纱线链接?

我如何知道我的本地链接包正在使用中而不是来自远程?它是否应该出现在我本地包的开发服务器中?

javascript package npm yarnpkg

15
推荐指数
2
解决办法
9339
查看次数

serve -s build 指定端口号

我正在尝试从 DigitalOcean droplet 提供 react-app 的构建文件夹。

After I run yarn build, I get told by the script to run

yarn global add serve serve -s build

However, when I run serve -s build, It say's it's running on http://localhost:5000. I would like it run on localhost:3000 instead, as I have another server running on port 5000. How can i specify the port number such that serve -s build runs on port 3000?

reactjs digital-ocean create-react-app yarnpkg

15
推荐指数
1
解决办法
2万
查看次数

Monorepo 中的对等依赖关系

当 monorepo 中的包具有对等依赖项时,如何在开发过程中使这些依赖项对它们可用?

例如,一个包在/packages/namespace/alpha/可能有一个devDependencystyled-components在它的package.json

可能的选项:

  1. 声明与开发依赖项相同的依赖项(不必要的重复和维护成本)。

  2. 在 monorepo 的路由中安装包package.json(使用yarn link.

我正在将 Lerna 与纱线工作区一起使用。

javascript npm lerna monorepo yarnpkg

15
推荐指数
1
解决办法
4324
查看次数

为什么我的Zookeeper服务器无法重新加入Quorum?

我的法定人数中有三台服务器.他们正在运行ZooKeeper 3.4.5.根据输出结果,其中两个似乎运行正常mntr.其中一个由于部署而在几天前重新启动,从那时起就无法加入法定人数.日志中突出的一些行是:

2014-03-03 18:44:40,995 [myid:1] - INFO  [main:QuorumPeer@429] - currentEpoch not found! Creating with a reasonable default of 0. This should only happen when you are upgrading your installation
Run Code Online (Sandbox Code Playgroud)

和:

2014-03-03 18:44:41,233 [myid:1] - INFO  [QuorumPeer[myid=1]/0.0.0.0:2181:QuorumCnxManager@190] - Have smaller server identifier, so dropping the connection: (2, 1)
2014-03-03 18:44:41,234 [myid:1] - INFO  [QuorumPeer[myid=1]/0.0.0.0:2181:QuorumCnxManager@190] - Have smaller server identifier, so dropping the connection: (3, 1)
2014-03-03 18:44:41,235 [myid:1] - INFO  [QuorumPeer[myid=1]/0.0.0.0:2181:FastLeaderElection@774] - Notification time out: 400
Run Code Online (Sandbox Code Playgroud)

谷歌搜索第一个('currentEpoch not found!')让我去了JIRA …

apache-zookeeper

14
推荐指数
1
解决办法
6141
查看次数

运行yarn时,将使用bash中的私有令牌生成yarn.lock文件

我正在使用Gem Fury作为我们的一些私人套餐.我将yarn注册表设置为使用它们的代理用于public和我们的私有节点模块:

yarn config set registry "https://npm-proxy.fury.io/$GEMFURY_TOKEN/username"
Run Code Online (Sandbox Code Playgroud)

GEMFURY_TOKEN是的.bash.yarn config get registry生产:

https://npm-proxy.fury.io/$(GEMFURY_TOKEN)/username
Run Code Online (Sandbox Code Playgroud)

当我们运行时yarn,该yarn.lock文件将生成以下内容:

private-module@0.1.0:
  version "0.1.0"
  resolved "https://npm.fury.io/username/private-module/-/0.1.0.tgz?auth=<GEMFURY TOKEN>"
  dependencies:
    ember-cli-babel "^5.1.6"

private-module-2@0.1.4:
  version "0.1.4"
  resolved "https://npm.fury.io/username/private-module-2/-/0.1.4.tgz?auth=<GEMFURY TOKEN>"
  dependencies:
    ember-cli-babel "^5.1.6"
    ember-inflector "^1.9.6"
Run Code Online (Sandbox Code Playgroud)

我不想在git存储库中使用私有令牌.有没有办法可以排除令牌yarn.lock在生成时被添加到文件中?

npm gem-fury yarnpkg

14
推荐指数
1
解决办法
693
查看次数

是否可以在不安装软件包的情况下生成`yarn.lock`文件?

我需要yarn.lock从我生成一个文件,package.json但我想避免node_modules创建..是否可能?

javascript yarnpkg

14
推荐指数
2
解决办法
975
查看次数