Closed Citrullin closed 7 years ago
@Citrullin what version of Inferno were you using when this happened? Sorry for the delay too – doing my very best to get everything in and working for the 1.0
release.
Everything is okay :) As I see, you have a family. That's definitely more important! :) The topic isn't so important. I removed the metadata is everything works ;)
"devDependencies": {
"autoprefixer": "^6.4.1",
"babel-core": "^6.0.20",
"babel-eslint": "^4.1.3",
"babel-loader": "^6.0.1",
"babel-plugin-inferno": "^0.7.7",
"babel-preset-es2015": "^6.0.15",
"babel-preset-react": "^6.0.15",
"babel-preset-stage-0": "^6.0.15",
"chart.js": "^2.2.2",
"css-loader": "^0.25.0",
"eslint": "^1.10.3",
"extract-text-webpack-plugin": "^1.0.1",
"file-loader": "^0.9.0",
"html-loader": "^0.4.4",
"html-webpack-plugin": "^2.22.0",
"image-webpack-loader": "^2.0.0",
"img-loader": "^1.3.1",
"inferno-test-utils": "^0.7.27",
"json-loader": "^0.5.4",
"node-sass": "^3.9.3",
"postcss-loader": "^0.13.0",
"redux-logger": "^2.6.1",
"sass-loader": "^4.0.2",
"sass-mq": "^3.2.9",
"style-loader": "^0.13.1",
"webpack": "^1.13.2",
"webpack-dev-server": "^1.12.1"
},
"dependencies": {
"inferno": "^0.7.27",
"inferno-component": "^0.7.27",
"inferno-dom": "^0.7.27",
"inferno-redux": "^0.7.27",
"inferno-router": "^0.7.27",
"redux": "^3.5.2",
"redux-thunk": "^2.1.0"
}
@Citrullin awesome, I'm glad to hear :) can you try 1.0
and see if you have different results? You can get it on NPM via npm install inferno@alpha11
etc and npm install --save-dev babel-plugin-inferno@alpha11
. :)
Yes, i give you a feedback in 5 minutes :)
Everytime: I got this error: version not found: inferno@1.0.0-alpha9 when i installed the npm dependencies: npm install
{
"name": "redux-inferno-hot-boilerplate",
"version": "1.0.0",
"description": "Boilerplate for Redux Inferno project with hot loading",
"scripts": {
"start": "node server.js",
"lint": "eslint src"
},
"repository": {
"type": "git",
"url": "https://github.com/citrullin/redux-inferno-hot-boilerplate.git"
},
"keywords": [
"redux",
"inferno",
"boilerplate",
"hot",
"reload",
"hmr",
"live",
"edit",
"webpack"
],
"author": "Philipp Blum",
"license": "MIT",
"bugs": {
"url": "https://github.com/citrullin/issues"
},
"homepage": "",
"devDependencies": {
"autoprefixer": "^6.4.1",
"babel-core": "^6.0.20",
"babel-eslint": "^4.1.3",
"babel-loader": "^6.0.1",
"babel-plugin-inferno": "^1.0.0-alpha11",
"babel-preset-es2015": "^6.0.15",
"babel-preset-react": "^6.0.15",
"babel-preset-stage-0": "^6.0.15",
"chart.js": "^2.2.2",
"css-loader": "^0.25.0",
"eslint": "^1.10.3",
"extract-text-webpack-plugin": "^1.0.1",
"file-loader": "^0.9.0",
"html-loader": "^0.4.4",
"html-webpack-plugin": "^2.22.0",
"image-webpack-loader": "^2.0.0",
"img-loader": "^1.3.1",
"json-loader": "^0.5.4",
"node-sass": "^3.9.3",
"postcss-loader": "^0.13.0",
"redux-logger": "^2.6.1",
"sass-loader": "^4.0.2",
"sass-mq": "^3.2.9",
"style-loader": "^0.13.1",
"webpack": "^1.13.2",
"webpack-dev-server": "^1.12.1"
},
"dependencies": {
"inferno": "^1.0.0-alpha11",
"inferno-component": "^1.0.0-alpha11",
"inferno-dom": "^1.0.0-alpha11",
"inferno-redux": "^1.0.0-alpha11",
"inferno-router": "^1.0.0-alpha11",
"redux": "^3.5.2",
"redux-thunk": "^2.1.0"
}
}
@Citrullin so this is something a lot of people (and I) have seen. It appears to be an issue with NPM. To get around it, you'll need to manually do npm install --save
bla bla rather than changing your package.json
and doing npm install
.
@joshburgess had this issue earlier too
@trueadm You already reported this?
@Citrullin not yet, I think it might be because I unpublished inferno@alpha9
that NPM is messed up (bad build).
@trueadm But it's definitely something on npm's side. I cleared the cache, removed all my node_modules, removed also infero in my package. Still this error.
@Citrullin you need to explicitly install the modules again via command line using --save
or --save-dev
. It will get around this bug for now.
@trueadm Yes and this works. I get the error:
client?843a:75 ./src/index.js Module build failed: SyntaxError: Unexpected token { at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:373:25) at Object.Module._extensions..js (module.js:416:10) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at /home/philipp/git/marketing-automation-frontend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:170:20 at Array.map (native) at Function.normalisePlugins (/home/philipp/git/marketing-automation-frontend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:150:20)
My index.js, but i think this will not really help:
import Inferno from 'inferno';
import InfernoDOM from 'inferno-dom';
import AppRouter from 'AppRouter';
import Head from './Head';
InfernoDOM.render(<Head title="Sample App"/>, document.head);
InfernoDOM.render(<AppRouter/>, document.getElementById('root'));
@Citrullin sounds like a babel-plugin-inferno
error. What version of Node are you using? It needs version 6+
@trueadm NPM 2.15.8 Node v4.4.7, I will upgrade
@trueadm Have I also to update the babel plugins?
Module build failed: Error: Plugin 0 specified in "/home/philipp/git/marketing-automation-frontend/.babelrc" provided an invalid property of "createOptVElement" at Plugin.init (/home/philipp/git/marketing-automation-frontend/node_modules/babel-core/lib/transformation/plugin.js:131:13) at Function.normalisePlugin (/home/philipp/git/marketing-automation-frontend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:144:12) at /home/philipp/git/marketing-automation-frontend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:176:30 at Array.map (native) at Function.normalisePlugins (/home/philipp/git/marketing-automation-frontend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:150:20) at OptionManager.mergeOptions (/home/philipp/git/marketing-automation-frontend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:224:36) at OptionManager.init (/home/philipp/git/marketing-automation-frontend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:338:12) at File.initOptions (/home/philipp/git/marketing-automation-frontend/node_modules/babel-core/lib/transformation/file/index.js:216:65) at new File (/home/philipp/git/marketing-automation-frontend/node_modules/babel-core/lib/transformation/file/index.js:137:24) at Pipeline.transform (/home/philipp/git/marketing-automation-frontend/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
{ "presets": ["es2015"], "plugins": ["inferno"] }
The plugin also has alpha11
. I'm off to bed now, so will continue to help you in the morning :)
Yupp, it has. Good night. Ohh no, forgot to install the babel plugin... This trouble with the package.json :D
Is this still an issue?
@Havunen I got an error. Mount, need to normalise etc. by Inferno. I will check it later.
@Citrullin can you come to the Inferno Slack so we can dig into this bug in detail? If you're not on there, email me at dg@domgan.com and I can send you an invite. Thanks!
This fails because there is no custom namespace support for SVG's not in the babel plugin neither in Inferno DOM according to my knowledge.
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
that is the content of metadata, Inferno should internally do following:
createElementNS("http://www.w3.org/1999/02/22-rdf-syntax-ns#", 'RFD')
Those namespaces are defined on SVG element root. Too difficult task for me, most likely needs @trueadm 's input.
@Citrullin this is something that React doesn't yet support either. It's a tricky one, I'll be honest: we "could" add this feature but it would mean we'd have to re-do a lot of the core foundations of Inferno and the plugin, which might have an impact on performance.
Can you work without using some of the specialist namespaces?
@trueadm I can also work without metadata and I do. It's only a think you have to know. If this fact is in the documentation, I'm fine with it. It's only a thing other users have to know.
I have a svg component:
With metadata the build will fail. Without, it works. The message: