gpt4 book ai didi

node.js - 语法错误 : Unexpected token ILLEGAL on comment with Web Component Tester

转载 作者:IT老高 更新时间:2023-10-28 23:01:55 27 4
gpt4 key购买 nike

我使用 Codeship 测试 my project基于Polymer starter kit v1.1 .

当我在测试管道中运行 npm test 时,我看到以下错误:

> @ test /home/rof/src/github.com/TFarla/night-live
> gulp test:local

/home/rof/src/github.com/TFarla/night-live/node_modules/browser-sync/node_modules/lodash/index.js:8404
/**
^^^

SyntaxError: Unexpected token ILLEGAL
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:413:25)
at Object.Module._extensions..js (module.js:452:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/home/rof/src/github.com/TFarla/night-live/node_modules/browser-sync/lib/hooks.js:3:20)
at Module._compile (module.js:434:26)
at Object.Module._extensions..js (module.js:452:10)
npm ERR! Test failed. See above for more details.

以下是设置命令:

# By default we use the Node.js version set in your package.json or the latest
# version from the 0.10 release
#
# You can use nvm to install any Node.js (or io.js) version you require.
nvm install 4.0
nvm use 4.0
npm install -g bower
npm install -g gulp
npm install && bower install

有人有解决办法吗?

编辑:不确定是否相关,但是当 Codeship 执行 npm install 时,它会输出很多未满足的依赖项。

npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/browser-sync/node_modules/browser-sync-ui requires connect-history-api-fallback@'0.0.5' but will load
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/connect-history-api-fallback,
npm WARN unmet dependency which is version 1.1.0
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/browser-sync/node_modules/socket.io/node_modules/engine.io requires debug@'1.0.3' but will load
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/browser-sync/node_modules/socket.io/node_modules/debug,
npm WARN unmet dependency which is version 2.1.0
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/browser-sync/node_modules/socket.io/node_modules/socket.io-parser requires debug@'0.7.4' but will load
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/browser-sync/node_modules/socket.io/node_modules/debug,
npm WARN unmet dependency which is version 2.1.0
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/browser-sync/node_modules/socket.io/node_modules/socket.io-client requires debug@'0.7.4' but will load
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/browser-sync/node_modules/socket.io/node_modules/debug,
npm WARN unmet dependency which is version 2.1.0
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/gulp-jshint/node_modules/jshint requires lodash@'3.7.x' but will load
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/gulp-jshint/node_modules/lodash,
npm WARN unmet dependency which is version 3.10.1
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/web-component-tester/node_modules/bower requires chalk@'^1.0.0' but will load
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/web-component-tester/node_modules/chalk,
npm WARN unmet dependency which is version 0.5.1
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/web-component-tester/node_modules/bower requires update-notifier@'^0.3.0' but will load
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/web-component-tester/node_modules/update-notifier,
npm WARN unmet dependency which is version 0.5.0
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/web-component-tester/node_modules/wd requires async@'~1.0.0' but will load
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/web-component-tester/node_modules/async,
npm WARN unmet dependency which is version 0.9.2
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/web-component-tester/node_modules/wd requires lodash@'~3.9.3' but will load
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/web-component-tester/node_modules/lodash,
npm WARN unmet dependency which is version 3.10.1
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/web-component-tester/node_modules/socket.io/node_modules/socket.io-parser requires debug@'0.7.4' but will load
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/web-component-tester/node_modules/socket.io/node_modules/debug,
npm WARN unmet dependency which is version 2.1.0
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/web-component-tester/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client requires debug@'1.0.4' but will load
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/web-component-tester/node_modules/socket.io/node_modules/socket.io-client/node_modules/debug,
npm WARN unmet dependency which is version 0.7.4
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/web-component-tester/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client requires parseuri@'0.0.4' but will load
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/web-component-tester/node_modules/socket.io/node_modules/socket.io-client/node_modules/parseuri,
npm WARN unmet dependency which is version 0.0.2
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/web-component-tester/node_modules/wct-sauce/node_modules/request/node_modules/har-validator requires chalk@'^1.0.0' but will load
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/web-component-tester/node_modules/chalk,
npm WARN unmet dependency which is version 0.5.1

最佳答案

安装依赖项后,您是否进入 Node 模块目录并更改了任何 lodash 文件?

  1. 您可以尝试以下方法。

  2. 在你的项目目录中,执行rm -r node-modules。这将删除 Node 依赖目录。

  3. 转到您的 package.json 并检查依赖项是否已弃用;检查他们是否在 npm 上有更新的版本。如果有,请相应地更新 package.json。 (浏览器同步的最新版本是 2.18.13)

  4. 列表项

  5. 执行 npm install
  6. bower 安装

关于node.js - 语法错误 : Unexpected token ILLEGAL on comment with Web Component Tester,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32679265/

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