-
Notifications
You must be signed in to change notification settings - Fork 71
npm test fails #10
Comments
HI, I also try it on Mac. If you try it on not Windows, It may occur for Win32 file system, so that change from "\" to "/". Modify the following lines in 'package.json'. line 76 line 85-86 I will pass the test. However, I cannot run it on Chrome by another problem. |
I have the same error as @johngriffin, and got past it by changing just line 76 of package.json:
But now I have a new error:
Working on debugging that! |
Part of the problem might be that I still had my local test server running while trying to reinstall my node modules. (I had run Getting this error now, which leads me to believe I need to change more lines in package.json, as @drjiro suggested:
|
Here's what I changed in package.json to get the test to pass: Line 76 Lines 85-86
I was still getting a "Cannot find module" error until I added to those lines. |
I'm on OS X Sierra using Visual Studio Code 1.21.1 @pemulis, are you sure your snippet is correct? Doing that got rid of the error Update 1:
Now I'm getting Had to include "testPathIgnorePatterns": [
"<rootDir>/(build|docs|node_modules|scripts)"
], Update 2: The latest VS Code error is FIx: replace Complete package.json {
"name": "drizzle-box",
"version": "1.0.0",
"devDependencies": {
"autoprefixer": "6.5.1",
"babel-core": "6.17.0",
"babel-eslint": "7.1.1",
"babel-jest": "22.4.1",
"babel-loader": "6.2.7",
"babel-preset-react-app": "^2.0.1",
"case-sensitive-paths-webpack-plugin": "1.1.4",
"chalk": "1.1.3",
"connect-history-api-fallback": "1.3.0",
"cross-spawn": "4.0.2",
"css-loader": "0.26.0",
"detect-port": "1.0.1",
"dotenv": "2.0.0",
"drizzle": "^1.0.1",
"drizzle-react": "^1.0.1",
"drizzle-react-components": "^1.0.1",
"eslint": "3.8.1",
"eslint-config-react-app": "^0.5.0",
"eslint-loader": "1.6.0",
"eslint-plugin-flowtype": "2.21.0",
"eslint-plugin-import": "2.0.1",
"eslint-plugin-jsx-a11y": "2.2.3",
"eslint-plugin-react": "6.4.1",
"extract-text-webpack-plugin": "1.0.1",
"file-loader": "0.9.0",
"filesize": "3.3.0",
"fs-extra": "0.30.0",
"gzip-size": "3.0.0",
"html-webpack-plugin": "2.24.0",
"http-proxy-middleware": "0.17.2",
"jest": "22.4.1",
"json-loader": "0.5.4",
"object-assign": "4.1.0",
"path-exists": "2.1.0",
"postcss-loader": "1.0.0",
"promise": "7.1.1",
"react-dev-utils": "^0.4.2",
"recursive-readdir": "2.1.0",
"strip-ansi": "3.0.1",
"style-loader": "0.13.1",
"truffle-contract": "^1.1.8",
"truffle-hdwallet-provider": "0.0.3",
"url-loader": "0.5.7",
"webpack": "1.14.0",
"webpack-dev-server": "1.16.2",
"webpack-manifest-plugin": "1.1.0",
"whatwg-fetch": "1.0.0",
"zeppelin-solidity": "^1.6.0"
},
"dependencies": {
"react": "^15.4.2",
"react-dom": "^15.4.2",
"react-redux": "^5.0.2",
"react-router": "^3.0.2",
"react-router-redux": "^4.0.7",
"redux": "^3.6.0",
"redux-auth-wrapper": "^1.0.0",
"redux-saga": "^0.15.3",
"redux-thunk": "^2.2.0"
},
"scripts": {
"start": "node scripts/start.js",
"build": "node scripts/build.js",
"test": "node scripts/test.js --env=jsdom",
"chain": "geth --datadir=\"/tmp/eth/60/01\" --nodiscover --maxpeers 0 --port 30301 --rpc --rpcapi \"db,eth,net,web3\" --rpcport 8101 --verbosity 6 console"
},
"jest": {
"collectCoverageFrom": [
"<rootDir>/src/**/*.{js,jsx}"
],
"setupFiles": [
"<rootDir>/config/polyfills.js"
],
"testPathIgnorePatterns": [
"<rootDir>/(build|docs|node_modules|scripts)"
],
"testEnvironment": "jsdom",
"testURL": "http://localhost",
"transform": {
"^.+\\.(js|jsx)$": "<rootDir>/node_modules/babel-jest",
"^.+\\.css$": "<rootDir>/config/jest/cssTransform.js",
"^(?!.*\\.(js|jsx|css|json)$)": "<rootDir>/config/jest/fileTransform.js"
},
"transformIgnorePatterns": [
"node_modules/.+\\.(js|jsx)$"
],
"moduleNameMapper": {
"^react-native$": "react-native-web"
}
},
"babel": {
"presets": [
"react-app"
]
},
"eslintConfig": {
"extends": "react-app"
}
} |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Had a clean unbox of drizzle. I get 'ReferenceError: [BABEL] /apps/drizzle01202019/app/src/App.test.js: Unknown option: base.configFile. Check out http://babeljs.io/docs/usage/options/ for more information about options.' at the Using nvm to use v11.7.0 of node, npm v6.5.0. After much research (doge style), I found a solution.
So after unboxing, I deleted the app/node_modules directory and re-installed from the app directory with
Yarn v1.13.0 After that, the out of the box test that comes with the drizzle box passed using
|
@JakeGlascock thanks for commenting and letting us know the workaround. But unfortunately, we can't expect our users to have Yarn installed. It's likely that this will remain broken until NPM or Babel fixes things. |
@adrianmcli Fair enough. Just wanted to make sure I helped out as I am excited about the Truffle/Drizzle combo and looking forward to all the great things it will be used to do. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been closed, but can be re-opened if further comments indicate that the problem persists. Feel free to tag maintainers if there is no reply to further comments. |
Hi, great library! Unfortunately npm test is failing for me, running on Mac OS X High Sierra.
I've tried removing node_modules and doing an npm install. No dice. Looks like the path is wrong in package.json.
The text was updated successfully, but these errors were encountered: