-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Cannot read property 'getName' of undefined #928
Comments
@yairEO Can you report full stack trace? |
@TrySound - How do I do that? I use Gulp to run Rollup in a task, and it looks like this:
the error message is generated from the |
|
|
I see the same issue with following setup: https://github.com/trueadm/inferno/blob/dev/config/rollup.config.js Updating rollup ("rollup": "^0.34.13", => "rollup": "^0.35.9") gives the same exception with OP.
Ubuntu 16.04 LTS + Node 6.5 |
@yairEO By the way you may return promise in gulp tasks to keep them in sync. |
Thanks Bogdan, I didn't know that. I use runSequence.. |
I meant returning promise like stream instead of calling callback. |
Yes I understood you meant that.. |
@yairEO Just something minimal which causes this error. |
Ok, I will do it tomorrow. did you test it on windows / linux yourself? maybe it will show it also with an empty entry file.. |
We have tones of tests. This is a specific case. |
but tests done on one kind of OS and with the the latest Node version or different versions? |
Our code in most cases is not os specific. The problem could be only with paths. But they was fixed some time ago. |
I'm getting what looks like the same error with on OSX, rollup version 0.35.10
here's my config import node from 'rollup-plugin-node-resolve';
import uglify from 'rollup-plugin-uglify';
export default {
entry: 'src/js/simple/index.js',
plugins: [
node({
jsnext: true,
// skip: [ 'd3' ],
}),
// uglify()
],
// external: [
// 'd3'
// ],
// globals: {
// d3: 'd3'
// },
moduleName: 'simpleCharts',
sourceMap: true,
targets: [
{ dest: 'public/js/simpleCharts.js', format: 'iife' }
]
} |
I thought I was going crazy... how can Rollup just work for everyone else and not me?!
OSX El Capitan (if that even matters). Minimal test case: // gulp task
const gulp = require('gulp');
const rollup = require('rollup').rollup;
const commonJs = require('rollup-plugin-commonjs');
const buble = require('rollup-plugin-buble');
const babel = require('rollup-plugin-babel');
const resolve = require('rollup-plugin-node-resolve');
gulp.task('scripts', () => {
return rollup({
entry: 'src/index.js',
plugins: [
buble(), // or babel...
// babel({
// babelrc: false,
// exclude: 'node_modules/**',
// presets: [ 'es2015-rollup', 'stage-0', 'react' ]
// }),
commonJs({
include: [ 'node_modules/**' ]
}),
resolve()
],
}).then(bundle => {
return bundle.write({
format: 'iife',
dest: 'dist/app.bundle.js',
});
})
}); // src/index.js
import React from 'react';
import { render } from 'react-dom'; |
Should this (big) bug be assigned to anyone? |
Looks like this is caused by Folks, some friendly advice on filing bugs: you will get a response much quicker if you can supply a minimal reproduction that we can investigate. Piecing things together from the scraps of evidence in this thread is very hard. 'Minimal' means no plugins (unless they're the source of the bug), and no Gulp nonsense. It's one thing for me to spend my free weekend time on this stuff, but when it turns out to be essentially user error I hope you can understand why I'm a little frustrated! #962 fixes this error and gives you a helpful warning. @Havunen I get the following warning with Inferno:
I can't find the corresponding files in the repo (some TypeScript thing I don't understand?) but if you remove @larrybotha You'll need to manually tell rollup-plugin-commonjs that @aubergene, @yairEO, afraid I can't know how to fix your cases from here, but if you use the version of Rollup I'm about to release, it will tell you. |
warn on missing unused imports in deshadowing phase, rather than throwing
@Rich-Harris thanks from your input and hard work. Maybe you can change this exception to something more user friendly? This exception just looks like something related to rollup and googling it shows up this thread. Just thought its related. Thanks for help :) |
@Havunen As of 0.35.15 (just released) you'll get the warning message above, identifying the non-existent export – no error |
@Rich-Harris Hi, I get same issue with latest rollup, when |
I get this error after updating to version
v0.35.9
and no bundle is generated.0.34.13
works fine.I'm on windows 7, Node
v6.3.0
The text was updated successfully, but these errors were encountered: