Closed frederikaalund closed 7 years ago
Can you point me to your code? That error doesn't make sense to me. If you pull the repository directly and do npm install && npm build
does it work?
Actually, nevermind. I think it is fixed by these commits: https://github.com/clbond/ng2-redux-form/commit/d2156d91ce828d7ba8233884a9cd68e36d8f84b6 https://github.com/clbond/ng2-redux-form/commit/83d0d26b69310efe331ddeeb089e0c29e5cb3253. Can you try again with 1.0.20?
Tried again with the newest version.
Frederiks-MacBook-Air:lab frederikaalund$ npm i --save ng2-redux-form
> ng2-redux-form@1.0.21 postinstall /Users/frederikaalund/Projects/lab/node_modules/ng2-redux-form
> npm run build
> ng2-redux-form@1.0.21 prebuild /Users/frederikaalund/Projects/lab/node_modules/ng2-redux-form
> npm run clean
> ng2-redux-form@1.0.21 clean /Users/frederikaalund/Projects/lab/node_modules/ng2-redux-form
> rimraf dist
> ng2-redux-form@1.0.21 build /Users/frederikaalund/Projects/lab/node_modules/ng2-redux-form
> cross-env NODE_ENV=production webpack
ReferenceError: [BABEL] /Users/frederikaalund/Projects/lab/node_modules/ng2-redux-form/source/index.ts: Unknown option: /Users/frederikaalund/Projects/lab/node_modules/ng2-redux-form/.babelrc.presets ReferenceError: [BABEL] /Users/frederikaalund/Projects/lab/node_modules/ng2-redux-form/source/index.ts: Unknown option: /Users/frederikaalund/Projects/lab/node_modules/ng2-redux-form/.babelrc.presets
at Logger.error (/Users/frederikaalund/Projects/lab/node_modules/babel-core/lib/transformation/file/logger.js:58:11)
at OptionManager.mergeOptions (/Users/frederikaalund/Projects/lab/node_modules/babel-core/lib/transformation/file/options/option-manager.js:126:29)
at OptionManager.addConfig (/Users/frederikaalund/Projects/lab/node_modules/babel-core/lib/transformation/file/options/option-manager.js:107:10)
at OptionManager.findConfigs (/Users/frederikaalund/Projects/lab/node_modules/babel-core/lib/transformation/file/options/option-manager.js:168:35)
at OptionManager.init (/Users/frederikaalund/Projects/lab/node_modules/babel-core/lib/transformation/file/options/option-manager.js:229:12)
at File.initOptions (/Users/frederikaalund/Projects/lab/node_modules/babel-core/lib/transformation/file/index.js:147:75)
at new File (/Users/frederikaalund/Projects/lab/node_modules/babel-core/lib/transformation/file/index.js:137:22)
at Pipeline.transform (/Users/frederikaalund/Projects/lab/node_modules/babel-core/lib/transformation/pipeline.js:164:16)
at transform (/Users/frederikaalund/Projects/lab/node_modules/awesome-typescript-loader/src/index.ts:188:46)
at transformationFunction (/Users/frederikaalund/Projects/lab/node_modules/awesome-typescript-loader/src/index.ts:89:48)
at compiler (/Users/frederikaalund/Projects/lab/node_modules/awesome-typescript-loader/src/index.ts:105:34)
at Object.loader (/Users/frederikaalund/Projects/lab/node_modules/awesome-typescript-loader/src/index.ts:18:18)
at LOADER_EXECUTION (/Users/frederikaalund/Projects/lab/node_modules/loader-runner/lib/LoaderRunner.js:114:14)
at runSyncOrAsync (/Users/frederikaalund/Projects/lab/node_modules/loader-runner/lib/LoaderRunner.js:115:4)
at iterateNormalLoaders (/Users/frederikaalund/Projects/lab/node_modules/loader-runner/lib/LoaderRunner.js:224:2)
at /Users/frederikaalund/Projects/lab/node_modules/loader-runner/lib/LoaderRunner.js:197:4
at Storage.finished (/Users/frederikaalund/Projects/lab/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:39:16)
at /Users/frederikaalund/Projects/lab/node_modules/graceful-fs/graceful-fs.js:78:16
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:445:3)
Hash: 23981fd2773c72878038
Version: webpack 2.1.0-beta.25
Time: 9617ms
+ 1 hidden modules
ERROR in ./source/index.ts
Module build failed: ReferenceError: [BABEL] /Users/frederikaalund/Projects/lab/node_modules/ng2-redux-form/source/index.ts: Unknown option: /Users/frederikaalund/Projects/lab/node_modules/ng2-redux-form/.babelrc.presets
at Logger.error (/Users/frederikaalund/Projects/lab/node_modules/babel-core/lib/transformation/file/logger.js:58:11)
at OptionManager.mergeOptions (/Users/frederikaalund/Projects/lab/node_modules/babel-core/lib/transformation/file/options/option-manager.js:126:29)
at OptionManager.addConfig (/Users/frederikaalund/Projects/lab/node_modules/babel-core/lib/transformation/file/options/option-manager.js:107:10)
at OptionManager.findConfigs (/Users/frederikaalund/Projects/lab/node_modules/babel-core/lib/transformation/file/options/option-manager.js:168:35)
at OptionManager.init (/Users/frederikaalund/Projects/lab/node_modules/babel-core/lib/transformation/file/options/option-manager.js:229:12)
at File.initOptions (/Users/frederikaalund/Projects/lab/node_modules/babel-core/lib/transformation/file/index.js:147:75)
at new File (/Users/frederikaalund/Projects/lab/node_modules/babel-core/lib/transformation/file/index.js:137:22)
at Pipeline.transform (/Users/frederikaalund/Projects/lab/node_modules/babel-core/lib/transformation/pipeline.js:164:16)
at transform (/Users/frederikaalund/Projects/lab/node_modules/awesome-typescript-loader/src/index.ts:188:46)
at transformationFunction (/Users/frederikaalund/Projects/lab/node_modules/awesome-typescript-loader/src/index.ts:89:48)
at compiler (/Users/frederikaalund/Projects/lab/node_modules/awesome-typescript-loader/src/index.ts:105:34)
at Object.loader (/Users/frederikaalund/Projects/lab/node_modules/awesome-typescript-loader/src/index.ts:18:18)
ERROR in [default] /Users/frederikaalund/Projects/lab/node_modules/ng2-redux-form/source/tests.utilities.ts:5:21
Cannot find name 'require'.
npm ERR! Darwin 16.0.0
npm ERR! argv "/usr/local/Cellar/node/6.7.0/bin/node" "/Users/frederikaalund/Projects/lab/node_modules/.bin/npm" "run" "build"
npm ERR! node v6.7.0
npm ERR! npm v2.14.21
npm ERR! code ELIFECYCLE
npm ERR! ng2-redux-form@1.0.21 build: `cross-env NODE_ENV=production webpack`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the ng2-redux-form@1.0.21 build script 'cross-env NODE_ENV=production webpack'.
npm ERR! This is most likely a problem with the ng2-redux-form package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! cross-env NODE_ENV=production webpack
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ng2-redux-form
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls ng2-redux-form
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/frederikaalund/Projects/lab/node_modules/ng2-redux-form/npm-debug.log
npm WARN babel-loader@6.2.5 requires a peer of babel-core@^6.0.0 but none was installed.
npm WARN minifyify@7.3.3 requires a peer of browserify@>= 5 but none was installed.
npm WARN redux-persist-transform-immutable@3.2.0 requires a peer of redux-persist@>=3.0.0 but none was installed.
npm WARN ng2-redux@3.3.9 requires a peer of rxjs@5.0.0-beta.6 but none was installed.
npm WARN @angular/core@2.0.0 requires a peer of rxjs@5.0.0-beta.12 but none was installed.
npm ERR! Darwin 16.0.0
npm ERR! argv "/usr/local/Cellar/node/6.7.0/bin/node" "/usr/local/bin/npm" "i" "--save" "ng2-redux-form"
npm ERR! node v6.7.0
npm ERR! npm v3.10.7
npm ERR! code ELIFECYCLE
npm ERR! ng2-redux-form@1.0.21 postinstall: `npm run build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ng2-redux-form@1.0.21 postinstall script 'npm run build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ng2-redux-form package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ng2-redux-form
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls ng2-redux-form
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/frederikaalund/Projects/lab/npm-debug.log
I am getting below error for npm install
$ npm install --save ng2-redux-form
ng2-redux-form@1.0.30 postinstall \node_modules\ng2-redux-form npm run build
ng2-redux-form@1.0.30 prebuild \node_modules\ng2-redux-form npm run clean
ng2-redux-form@1.0.30 clean \node_modules\ng2-redux-form rimraf dist
ng2-redux-form@1.0.30 build \node_modules\ng2-redux-form tsc
source/form-store.ts(5,19): error TS2304: Cannot find name 'require'. source/module.ts(4,19): error TS2304: Cannot find name 'require'.
Appreciate your help !!!
The issue with missing require
was caused by an upstream change and is fixed now, @chinra02 and @frederikaalund. Try with the latest package
Thanks for fixing the issue, looks like npm install has dependency with "@types/chai": "^3.4.34", "@types/jasmine": "^2.5.35", after adding these 2 to my Dev dependencies, npm install works fine.
Once again thanks and you are awesome :+1:
Thank you! I moved those to dependencies
based on your comment. Thank you @chinra02!
A fresh install of 1.0.19 from npm (
npm install --save ng2-redux-form
) results in the following errors:Let me know if you need further information.