Using a clone of https://github.com/keystonejs/keystone-test-project and its Keystone dependency on the current master branch. Navigate to /keystone.
No error :)
Keystone throws error.
$ npm start
> [email protected] start D:\DEV\WORKSPACE\keystone-test-project
> node keystone.js
Application Mounted
------------------------------------------------
KeystoneJS Started:
Keystone Test is ready on port 3000
------------------------------------------------
Application Started
GET /keystone/signin 200 8.241 ms
2016-07-27 16:07:87 error building Signin/index.js:
Unknown plugin "transform-class-properties" specified in "D:\\DEV\\WORKSPACE\\keystone-test-project\\node_modules\\inline-style-prefixer\\package.json" at 0, attempted to resolve relative to "D:\\DEV\\WORKSPACE\\keystone-test-project\\node_modules\\inline-style-prefixer" while parsing file: D:\DEV\WORKSPACE\keystone-test-project\node_modules\inline-style-prefixer\static.js
Yes - this is reproducible on master. #3178
GET /admin/signin 200 8.746 ms
2016-07-28 21:07:45 error building Signin/index.js:
Unknown plugin "transform-class-properties" specified in "/Users/XYZ/GitHub/project/admin/node_modules/inline-style-prefixer/package.json" at 0, attempted to resolve relative to "/Users/XYZ/GitHub/project/admin/node_modules/inline-style-prefixer" while parsing file: /Users/XYZ/GitHub/project/admin/node_modules/inline-style-prefixer/static.js
I can't reproduce this with a fresh checkout of master and a clean npm install. I'm running Keystone linked though. Can you both try rm -rf node_modules && npm install and see if you can still reproduce it?
Same issue on latest master @4cb2d51
4:22:47 PM web.1 | ------------------------------------------------
4:22:47 PM web.1 | KeystoneJS Started:
4:22:47 PM web.1 | redacted is ready on port 5000
4:22:47 PM web.1 | ------------------------------------------------
4:22:50 PM web.1 | GET /keystone/signin 200 6.168 ms
4:22:52 PM web.1 | 2016-07-28 16:07:45 error building Signin/index.js:
4:22:52 PM web.1 | Unknown plugin "transform-class-properties" specified in "/Volumes/PROJECTS/Projects/redacted/node_modules/inline-style-prefixer/package.json" at 0, attempted to resolve relative to "/Volumes/PROJECTS/Projects/redacted/node_modules/inline-style-prefixer" while parsing file: /Volumes/PROJECTS/Projects/redacted/node_modules/inline-style-prefixer/static.js
Which verison of npm are you on? ($ npm -v)
node v6.3.1
npm 3.10.6
OK so we replicated this while deploying to a staging (linux) server today, with keystone (master) as a dependency in a project's package.json. Node 6.x, npm 3.x
I realised it's happening because babel has a plugin (babel-plugin-transform-class-properties) specified in the package.json of an Aphrodite dependency (inline-style-prefixer). This is _really_ weird, because babel should be ignoring everything in node_modules by default. Also, I still can't reproduce it locally (OS X, Node 6.3.1, npm 3.10.3)
I fixed it by ensuring Aphrodite is loaded from the common packages bundle (it should have been but there was a condition meaning it wasn't), which should make this symptom go away because browserify never tries to build the bundle at runtime, but the underlying issues are:
@danielmahon @SharadKumar @sylvainlap can you confirm that the new updates to master fix this in your environments please? then we should really still try and get to the bottom of it.
Hi @JedWatson - clearing up node_modules and latest master worked fine. Thanks.
Great, thanks for letting me know! Now to figure out what is up with Babel... that's concerning.
Related issue with 'inline-style-prefixer'
GET /keystone/ 200 28.522 ms
2016-08-15 13:08:65 error building App/index.js:
Unknown plugin "add-module-exports" specified in ".../inline-style-prefixer/package.json" at 1, attempted to resolve relative to "/Users/.../node_modules/inline-style-prefixer" while parsing file: /Users/.../node_modules/inline-style-prefixer/static.js
@PatrickJongmans Getting the same thing.
My errors:
2016-08-15 22:08:68 error building FieldTypes:
Unknown plugin "transform-inline-environment-variables" specified in ".../node_modules/jss/.babelrc" at 0, attempted to resolve relative to ".../node_modules/jss" while parsing file: .../node_modules/jss/lib/index.js
2016-08-15 22:08:69 error building FieldTypes:
[BABEL] .../node_modules/jss-px/lib/index.js: Using removed Babel 5 option: .../node_modules/jss-px/.babelrc.stage - Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets while parsing file: .../node_modules/jss-px/lib/index.js
2016-08-15 22:08:96 error building App/index.js:
Unknown plugin "add-module-exports" specified in ".../node_modules/inline-style-prefixer/package.json" at 1, attempted to resolve relative to ".../node_modules/inline-style-prefixer" while parsing file: .../node_modules/inline-style-prefixer/static.js
Versions:
Node: v6.2.0
Npm: 3.9.3
@PatrickJongmans now there is another error in console of the browser and no UI renders
Uncaught Error: Cannot find module 'aphrodite/no-important' packages.js:4
tested on MAC OS on fresh keystone-test-project with latest keystone from repo
I have tried to understand whats wrong:
When I run the project with npm run dev then change all aphrodite/no-important to aphrodite in node_modules/keystone/*, I see the errors in the console
2016-08-20 22:08:90 error building FieldTypes:
Unknown plugin "add-module-exports" specified in "/private/tmp/keystone-test-project/node_modules/inline-style-prefixer/package.json" at 1, attempted to resolve relative to "/private/tmp/keystone-test-project/node_modules/inline-style-prefixer" while parsing file: /private/tmp/keystone-test-project/node_modules/inline-style-prefixer/static.js
then I install babel-plugin-add-module-exports and after changes there another error
2016-08-20 22:08:60 error building FieldTypes:
Couldn't find preset "stage-0" relative to directory "/private/tmp/keystone-test-project/node_modules/inline-style-prefixer" while parsing file: /private/tmp/keystone-test-project/node_modules/inline-style-prefixer/static.js
than I install needed presets
npm i babel-preset-stage-0
then I make another changes and finally I see
2016-08-20 23:08:18 rebuilt FieldTypes
2016-08-20 23:08:43 rebuilt Signin/index.js
2016-08-20 23:08:28 rebuilt App/index.js
and UI works again
@w01fgang Yes, I am getting the same...
I have a similar issue. If needed I'll open a new issue. But maybe some of you can help me?
2017-06-10 15:06:39 error building Signin/index.js:
Unknown plugin "transform-runtime" specified in "/home/user/.babelrc" at 0, attempted to resolve relative to "/home/user" while parsing file: /home/user/projects/datebe/node_modules/object-assign/index.js
Just a little background:
OS: Ubuntu
Node: 7.10.0
NPM: 5.0.3
I used the yeoman generator to create a new KeystoneJS Beta5 project. Creation went fine. Starting the project also works. Accessing the first page also works. But when I try to access the keystone/signin path the error appears.
Kind regards,
Daniel
@DaTebe It seems that transform-runtime plugin is not installed but does exist in .babelrc
you need to install babel-plugin-transform-runtime
I've already tried to install it in my Project. I'll try to install it globally.
Edit: Installing the dependencies globally did not work.
I had the same error, unrelated to Keystone, so in case it will help anyone, here is what fixed it...
I was using the Babel transpiler and noticed that my ~/.babelrc had the "transform-class-properties" dependency specified. So, I created a local myproject/.babelrc with only { "presets": ["env"] } inside.
It worked after that!
We've since removed aphrodite. Closing.
Most helpful comment
Yes - this is reproducible on
master. #3178