Open jorisbontje opened 8 years ago
Totally mysterious to me. Cannot duplicate and cannot seem to figure out how you'd trigger that error. Any luck with Dapple at commit 5fbafee2177593f32feecc65df88bb0a462ccf37 ?
To reproduce on a vanilla ubuntu:15.10 docker container with:
apt update
apt install -y curl
curl -sL https://deb.nodesource.com/setup_5.x | bash
apt install -y nodejs git build-essential python
cd $HOME
echo -e 'environments:\n evm: default' > .dapplerc
git clone https://github.com/makerdao/maker-otc
cd maker-otc/
git submodule update --init --recursive
echo -e '{"scripts": {"postinstall": "dapple build --template meteor --no-deploy-data"},"devDependencies": {"dapple": "0.7.1"}}' > package.json
npm install --unsafe-perm
I hit the same problem today, it is because "node_module" is under the same directory of dapplefile. When you run dapple test, it will try to include node_modules/dapple/test/_fixtures/testenv/empty_package/dappfile, which is an empty "YML" file.
I haven't found a good workaround, and I was hoping dapplefile ignore field could help to add node_modules to ignore directory...
@ryepdx thoughts on this? ^
with solidity 0.4.1 and dapple 0.8.0 running dapple test
against https://github.com/makerdao/token-auction:
$ dapple test
WARN: you seem to have no chain named default!
WARN: you seem to have no chain named morden!
WARN: you seem to have no chain named live!
Testing...
/Users/mids/.node/lib/node_modules/dapple/node_modules/solc/soljson.js:1
(function (exports, require, module, __filename, __dirname) { var Module;if(!Module)Module=(typeof Module!=="undefined"?Module:null)||{};var moduleOverrides={};for(var key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var ENVIRONMENT_IS_WEB=typeof window==="object";var ENVIRONMENT_IS_WORKER=typeof importScripts==="function";var ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof require==="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;var ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){if(!Module["print"])Module["print"]=function print(x){process["stdout"].write(x+"\n")};if(!Module["printErr"])Module["printErr"]=function printErr(x){process["stderr"].write(x+"\n")};var nodeFS=require("fs");var nodePath=require("path");Module["read"]=function read(filename,binary){filename=nodePath["normalize"](filename);var ret=nodeFS["readFileSync"]
TypeError: Cannot read property 'indexOf' of undefined
at _.map (/Users/mids/.node/lib/node_modules/dapple/node_modules/dapple-core/export.js:16:30)
at /Users/mids/.node/lib/node_modules/dapple/node_modules/lodash/lodash.js:3506:27
at /Users/mids/.node/lib/node_modules/dapple/node_modules/lodash/lodash.js:4880:15
at baseForOwn (/Users/mids/.node/lib/node_modules/dapple/node_modules/lodash/lodash.js:2966:24)
at /Users/mids/.node/lib/node_modules/dapple/node_modules/lodash/lodash.js:4849:18
at baseMap (/Users/mids/.node/lib/node_modules/dapple/node_modules/lodash/lodash.js:3505:7)
at Function.map (/Users/mids/.node/lib/node_modules/dapple/node_modules/lodash/lodash.js:9468:14)
at _.uniq._.flatten._.map.env (/Users/mids/.node/lib/node_modules/dapple/node_modules/dapple-core/export.js:15:11)
at /Users/mids/.node/lib/node_modules/dapple/node_modules/lodash/lodash.js:3506:27
at /Users/mids/.node/lib/node_modules/dapple/node_modules/lodash/lodash.js:4880:15
trying to trigger dapple with a npm post-install hook (for Heroku deployment), I get the following stack trace:
the package.json contains: