- mongodb - 在 MongoDB mapreduce 中,如何展平值对象?
- javascript - 对象传播与 Object.assign
- html - 输入类型 ="submit"Vs 按钮标签它们可以互换吗?
- sql - 使用 MongoDB 而不是 MS SQL Server 的优缺点
我使用 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 文件?
您可以尝试以下方法。
在你的项目目录中,执行rm -r node-modules
。这将删除 Node 依赖目录。
转到您的 package.json 并检查依赖项是否已弃用;检查他们是否在 npm 上有更新的版本。如果有,请相应地更新 package.json。 (浏览器同步的最新版本是 2.18.13)
列表项
npm install
bower 安装
关于node.js - 语法错误 : Unexpected token ILLEGAL on comment with Web Component Tester,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32679265/
一旦在 qconsole Marklogic 中运行以下代码,我就会遇到以下错误 XDMP-UNEXPECTED: (err:XPST0003) Unexpected token syntax err
我已经在我的包中编写了这个函数。 def partitionIntoDays(ls, number, lookupKey=None): ''' Partitions the location
我只是一个 android 初学者,我已经安装了 Android Studio(版本是 1.0.2),并创建了一个新的空白应用程序,按照名为“构建你的第一个应用程序”的官方教程,我学习到这个页面' h
这只是前几天工作,但我刚刚将我的代码更新到运行乘客 2.2.4 的审查服务器,而我的 2.3.4 rails 应用程序现在无法在那个盒子上启动。 乘客报告: Passenger encountered
我正在尝试使用带有 Angular 2的整页, 将其导入我的 app.module.ts 时出现以下错误。 "(SystemJS) Unexpected token ) at Obje
TFS2015 vNext 构建失败并出现记录器错误(下面附有错误消息)。根据我的调查,这看起来与 CentralLogger - "Microsoft.TeamFoundation.Distribu
计算机科学学校项目。我需要编写一个程序,其中用户声明数组的大小,然后以数字、非递减顺序填充数组,然后声明一个值 x。然后将 X 分配到适当的位置,以便整个数组按数字、非递减顺序排列。然后输出该数组。
在这 2 个方法中,inspect1 显示编译错误“Unexpected bound”而 inspect2 工作正常,为什么? public void inspect1(List u){ S
已关闭。这个问题是 not reproducible or was caused by typos 。目前不接受答案。 这个问题是由拼写错误或无法再重现的问题引起的。虽然类似的问题可能是 on-top
我正在尝试运行以下代码,但遇到了“此时意外”错误。 (echo COPY (SELECT ta.colA as name, ta.colB as user_e, ta.colC as user_n,
我有以下查询: select u.UserName, count(*) as total from Voting v join User u using (UserID) where unique (
我们有以下查询在 MSSQL 中完美运行但在 MySQL 中无法运行: select CONVERT(datetime, dateVal) as DateOccurred, itemID, COUNT
我的代码中存在缩进错误问题。它看起来是正确的...有人能指出我做错了什么吗?我的查询行不断收到错误。 def invoice_details(myDeliveryID): conn = pym
我有以下代码: int a , b , sum; cin>>a>>b; sum=a+b; cout>a>>b>>c; cout<
这个问题不太可能帮助任何 future 的访问者;它只与一个小的地理区域、一个特定的时间点或一个非常狭窄的情况有关,这些情况并不普遍适用于互联网的全局受众。为了帮助使这个问题更广泛地适用,visit
我在一个批处理文件上运行这个命令: for %I in (*.txt *.doc) do copy %I c:\test2 ...它不断返回: I was unexpected at this tim
创建查询时出现错误: 'from' unexpected 我的代码如下: @Override public Admin findByAdmin(Admin admin) {
我正在尝试运行此 python 代码,但我不断收到错误消息“意外缩进”。我不确定怎么了。间距似乎很好。有什么想法吗? services = ['Service1'] for service in
我在名为“circular_dependency”的目录中有一些 python 文件: 导入文件_1.py: from circular_dependency.import_file_2 import
我正在尝试使用 gcc 编译代码并运行可执行文件,但它抛出错误: gcc somefile.c -o somefile 编译成功。但是,当我尝试执行它时: $sh somefile 它导致:语法错误:
我是一名优秀的程序员,十分优秀!